Prevent "An unexpected website was found in the request" in the logs

I regularly see entries like the following in /var/log/php.log:
Error in Matomo (tracker): An unexpected website was found in the request: website id was set to '24' .

This is rather annoying as it doesn’t state which domain was using this id before. So, this should either be left out completely or entries from the table “site” shouldn’t be deleted. Delete corresponding data in other tables, but not that record itself, just add a field “deleted” and set that to “true”.

This would also prevent having users asking for help about those messages.

Lars
PS: Using the latest Matomo 4.2.1