Have you tried rebooting the phone?
If it still does it, try booting into safe mode (will mean booting while pressing some button combination or sequence - that varies between devices, and I've no experience of Realme, but a quick web search will find it). What safe mode does is disable all user-installed apps. If the problem goes away in safe mode and returns when you reboot normally that will tell you that one of your apps is the cause - the trickier bit then is working out which. Though if it is an app it will have to be something with the privileges to interfere with system settings, which should narrow it down. Given the things that are misbehaving I'd be very wary of any "power saver" or "system optimisation" type app you might have installed (you generally don't need such things anyway), or of any "automation" apps (could something be triggering a profile you created?).
Of course another possibility is in the word "beta". Android 11 has been around for a while (I've been using it for more than a year), but if Realme's version for your device is a beta it's possible that you have met a bug in the software. But either way, it's really hard to guess what specifically might cause this. Does it happen all the time, or in certain conditions (when you've recently used some app, at a certain time of day, when you are plugged in, ...) - anything more than just the fact that it happens might give some clue as to the cause. But unfortunately at this moment all I can do is agree that it's weird.