On iPhone and iPad an app cannot lock itself, but Guided Access can lock it
for you. In Settings → Accessibility → Guided Access, turn it on and set a
passcode, then open Splatpad and triple-click the side button. The app has a
step-by-step guide behind the button How to lock the app on its start screen.
On the Mac the app fills the screen, hides the Dock and menu bar, and blocks
switching apps and Force Quit. To leave, hold ⌘⌥⇧ Q for three seconds.
A few controls cannot be blocked by any app on either platform, such as the
power button. If you want to be extra safe on the Mac, also turn off Spotlight
and the system gestures in System Settings.