Odd coincidence I ran into a similar problem with my OnePlus when it was running 11. I'd set the screen to go off at 5 minutes and that worked out well for a bit. Then a few hours later or even a few days later, the screen would go asleep after 15 seconds. I'd set it back to 5 minutes, and the bizarre cycle would repeat. Turns out there's an obscure option buried pretty deep in the Settings menu that I needed to just disable so my preference for 5 minutes would stay that way. It was in the Settings >> Battery >> Power saving mode >> Default optimizations menu and the option was 'Change auto screen-off time to 15 seconds'.
There's likely to be a similar option in your Samsung but in a different menu hierarchy and/or using slightly different naming. Use the Search feature at the top when you first open the Settings menu, that can save time trying to get to some lessor options buried really deep in a contextual menu inside another contextual menu.