Old ipads could do this with the ringer switch. I never used it like that though
I just thought of a useful way to use the action button on iPhone 15’s
Set it to toggle rotation lock, as someone who uses an iPad a decent-ish amount, this would be super useful, personally.