Hello Isaac,
Floating license is automatically returned to the server, when all application instances on the given computer are closed.
If you are speaking of node-locked license, then maybe you should create a batch script that will start Metashape and has a deactivation line. Or even create a custom menu item that will perform two actions consequently: deactivate the license using shell command and then quit the application.