I don't think you are using this custom ROM (so it does not really make sense as a bug here), but an hypothesis would be that your battery requires a replacement.
@kenhill If you did not update your ROM recently, I think it is linked to this announcement
https://xiaomi.eu/community/threads/migration-of-ota-metadata-source.72743/
@sirrixofficial Again, you are posting in the install guide of a custom ROM, this is not the best place to ask detailed questions about updating your official ROM. Gogocar62 gave you the link to the official website, they have a forum there.
Even the XiaomiEUModule is regularly broken by Google, requiring a new version.
So a universal hack hiding the unlocked bootloader from every detection method by every company... I would not hold my breath.
TWRP does not root the device by default (I believe some specific versions have this feature, but it is not standard).
Keep in mind some banking apps can detect an unlocked bootloader.
The phone is still encrypted if you have a password and an unlocked bootloader, but it is possible to clean...