Screen recording and mirroring simultaneously?

I am a teacher. I have half the people physically in my class, while the other half is at home (no streaming).

I need to record the class that I am projecting so I can upload the video after the class for the other half.

I have tried through screen mirror and using lightning to VGA adapter. But it seems that iPad doesn't allow record+share screen at the same time. With or without cables.

Is there any solution? Any app out there to record screen while mirroring?

I'm quite desperated.

(iPad pro 2017)