Aimy Canonical v27.0 adds support for Joomla! 5 and allows to automatically convert the case of a canonical link's path to lowercase or uppercase (PRO feature).
Please make sure to update the plugin before updating to Joomla! 5.
Joomla!'s backward compatibility plugin must be kept enabled on Joomla! 5.