I’ve just now realized I’m having the same issue. Apparently, clearing the cache of the Settings app and restarting the phone temporarily fixes it. But it can probably come back at any time. See https://www.getdroidtips.com/screen-timeout-not-working-android-12/
Make sure to #contactsupport