When a task is deleted the logged hours for the task stay in the project and can be seen under Actual Hours in Project Details> Overview.
They can be deleted from Hours tab in the project.
- Go to the Hours tab in the project
- Select the hours of the deleted task and click Delete (the name of the task is displayed under Source tab)
- Go to Project Details, Actual Hours changed accordingly