How though? You really haven’t thought this one through.
Ruing full macOS installation. Invoke tablet mode when no keyboard and mouse attached.
M1 is powerful enough to run macOS and tablet mode at same time.
Never understand why iPad can’t just take secondary display and use external display for full desktop operation. M1 iPad still just mirroring iPad display.