I've found a possible bug in the Virtualmin post action scripts:
During DELETE_DOMAIN action on alias sub-servers as part of the deletion of their parent, Custom fields presented via VIRTUALSERVER_FIELD_FIELD_NAME contain the values from the parent server.
Example: CUSTOM_ID is defined is a custom field. In the domain 'testersson.com' this is defined as '12345' and in its alias domain 'testersson.example.org' as '09876'
We attempt to delete the domain 'testersson.com', and test the value of $VIRTUALSERVER_FIELD_CUSTOM_ID
Expected result: testersson.example.org - 09876 testersson.com - 12345
Actual result: testersson.example.org - 12345 testersson.com - 12345
Further testing shows this also happens for MODIFY_DOMAIN.