MacBook Air M2 freezes on screen mirroring with iPad pro
I am using iPad Pro 2020 as an extended monitor for MacBook Air M2 2022 with screen mirroring. While using Citrix workspace(for office), I have observed intermittent freezing of screen on Macbook if screen mirroring is on for 5-6 hours. Screen freezes for a while, mouse cursor drags and responds with a lag etc. Post turning off screen mirroring, MacBook works like a breeze. Is it because of lower memory i.e. 8 GB RAM or is there any setting that can resolve this. If I use MacBook with a hub and external monitor, will this cause similar issues?
MacBook Air, macOS 14.3