Be sure to backup your phone first before doing anything related to hex.
Have you tried clearing cache of hex and associated apps?
Or reapplying their theme?
Perhaps you can also go to android recovery mode then clear cache partition then repair apps.
If none of those worked but you have the hex and other associated apps latest version, maybe all you can do is wait for their developer/s to update them to be compatible with OneUI 5.1.
Thanks for sharing your experience with the recent updates on your Samsung Galaxy A51 having issues with the hex installer not working.
In order to pinpoint the root cause of the issue, you may submit an error report through the Samsung Members app as follows:
Step 1. Long press Samsung Members icon on Apps screen and tap Error reports.
Step 2. Tap OK on agreement popup to send system log data.
Step 3. Select Symptom category "Application".
Step 4. Describe the problem in details and SEND.
Should you need further assistance and guidance, you may contact us via our online Samsung Customer Care support channels below.