1. did this happen after a recent update or always?
2. does the auto rotate problem happen on apps (system wide) or just certain ones?
3. what software build is your phone on? (settings > about phone > software information > build number [last 4 characters])
4. Try submitting an error report through the Samsung Members app!
5. check if you have any bixby routine enabled that can be triggering auto rotate to toggle on!