Problem is that I’m not sure it’s easy to deal with that use case from the package install script.
At least people will clearly notice it and can refer to https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/#HMywikiisemptyafterupgradingaTomcat9basedpackage or the release note.