After i screen share my pc lagg out can't even run minecraft properly

Its my 3rd time i am getting this issue when i screen share in discord and run minecraft i got 60 fps in between then its freeze. this issue when i reinstall os but i can't do anymore and fixes?

What Graphics are you currently using?

sudo lshw -C video

Are you using Wayland?