Freeze screen when device charging

I’ve been having problems with my Motorola G34 5G while charging. The charging screen freezes on the power icon, and the Power On/Off button simply fails to boot the system. I need the device to completely discharge before it can restart, and only then, when it starts charging and the power icon disappears, can I quickly press the Power button. Please fix this bug.