Sonar is reporting coverage on deleted files

We are using Sonar Version 9.6.1 (build 59531).
I have a project where code coverage is 85-95%, but Sonar is reporting 75% project coverage.
Sonar is reporting 0% coverage on files that have been deleted from the project.
Is there a way to erase/purge reporting on files that are no longer a part of a project?
I have considered excluding the folders containing the deleted files but this may affect coverage in the future.

Hey there.

SonarQube only analyzes files that exist on the file system during the scan (and fully replaces the previous files on each analysis) – so… I would double-check what commit you’re analyzing (or even run a tree-like command immediately before your analysis. You should also make sure this analysis is successful, and changes made in other files are reflected.

SonarQube only analyzes files that exist on the file system during the scan

I would have thought so too, but that does not appear to be the case.
The branch is master. The files concerned were deleted months ago.
The 1st Sonar scan was run on Nov 1 (long after the files were deleted).

When I look at Overall code coverage, Sonar is listing these deleted files as having lines that require coverage.

What about this point?

the analysis was successful, however, a subsequent PR and analysis has corrected it.
I suspect this is more to do with git and the container it runs in.