Any upgrades will remove customizations including themes. Best thing to do, before the upgrade, is to save the custom theme to another directory outside of /opt/zimbra. After the upgrade is completed, you should be able to put the custom theme back into zimbra with the 'zmskindeploy' command.