How the plugin can tell to the host the project state became dirty?

The hosts are not registering a change inside the plugin as a change in the projects if it’s not based on a parameter change (how would they, obviously). So if you make any changes to your patch that would be saved with the project but not exposed with a parameter to the host, then the host will show the project as saved and that can be misleading for the user, thinking their project is saved. Live even greys out the “Save” option in the file menu, so you have to use “Save as” to overwrite the file with the latest changes. Is there a best practice how to handle this situation, when you want to tell to the host, it should mark the project modified because something was changed inside the plugin?

I hoped maybe the AudioProcessor::updateHostDisplay() function can help with this (despite its GUI related name), but it seems it doesn’t help in Live.