Presenting screen in Teams for Android: Screen goes blank when I move hand near camera
You're triggering the proximity sensor. Those are located somewhere above the screen or in the notch, depending on the design of your device.
The purpose of proximity sensor is to disable screen and touchscreen inputs when you're talking with your phone next to your head. It prevents accidentally interacting with the touchscreen with your ear.
It's mostly useful for regular phone calls, but internet calling software can also make use of it.
Your screen sharing is probably still in progress while you do that, it only blanks your display.