This may be possible with some of the management systems such as
ManageXR, ArborXR, Intune, or Meta for Education or Business solutions
for MDM (Mobile Device management) Not having tested recently I would
also look for feature to lock in KIOSK mode ...