I have been having this screen rotation problem for probably 2 years and have even sent my Tab S2 back to Samsung (while under warranty) back in 2016, which obviously did nothing for the long term. I do notice that when my screen stops rotating and I reboot, the option for Auto screen brightness has been replaced with the Outdoors checkbox. Anyone else experience this? Well, I could always shut down then boot into recovery mode then wipe the partition cache and it would be fixed. I have tried doing this today about 4-5 times with no fix. Has anyone heard anything on this? Does anyone have any ideas?

All of a sudden I'm having the same problem. It might be that after three years, planned obsolescence is kicking in. Toggling the auto rotation button has no effect whatever. Anyway I attempted the rather drastic solution suggested in one of the replies in rebooting the tablet pressing all the button thingys at the same time. Six hours later it was still "downloading". Pooft to that. This might sound dreadfully simple but I've found that if I'm in landscape mode and I load an app that only works in portrait mode the tablet stays in portrait mode for subsequent apps that have no preference for orientation. And vice versa. To get to landscape mode I load an app that only works in landscape. Lo and behold the tablet will stay in landscape mode until you load a portrait app. And vice versa. Clunky I know but it works for me without having to faff about with funny apps.