This sounds so weird that I can't believe I am asking about this.
I have two exactly the same Redmi 11S (same in terms of purchase date and software installed). One of them has fallen a couple of times and has about 25% of the screen broken, though still fully usable. The second one has screen intact.
Each time I connect an USB-C cable in data transfer mode, the phone with broken screen gets wako:
I cannot start photo app from the lock screen, I cannot draw an unlock patters, I cannot even unlock it, screen is totally unresponsive.
When I unlock the screen before attaching an USB-C cable and only then I attach it, then screen gets wako; "something" is randomly changing launcher pages and touching icons, the phone lives on it's own.
When I connect the very same cable in charge mode (i.e. attach it to the wall socket charger instead to the PC) or connect the second Redmi 11S (using the same cable), the phone operates normally.
Tested on both Redmi 11S, on two different cables and three different USB ports on the same PC.
What am I missing. How can a broken screen and USB cable influence each other?