If you delete a project with non-deprovisioned compute servers, then after a few weeks the project is purged and you can't undelete the project. As a result you can't deprovision the compute servers, and keep getting charged. Instead, if there are any compute servers that are provisioned then do not allow deleting the project.
The other option would be to make clicking "delete" on a project automatically and immediately deprovision all compute servers. This has the potential to cause severe data loss, so probably isn't a good idea.
If you delete a project with non-deprovisioned compute servers, then after a few weeks the project is purged and you can't undelete the project. As a result you can't deprovision the compute servers, and keep getting charged. Instead, if there are any compute servers that are provisioned then do not allow deleting the project.
The other option would be to make clicking "delete" on a project automatically and immediately deprovision all compute servers. This has the potential to cause severe data loss, so probably isn't a good idea.