Thanks for using the Apple Support Communities.
I understand that you upgraded your iPhone to the latest software and now the phone continually rotates and freezes, even though Orientation Lock is enabled. I'm happy to provide you with some assistance for this.
Since this just happened after a software update, I recommend a reinstall of iOS. First, use this article to make sure that you have a backup of your iPhone: How to back up your iPhone, iPad, and iPod touch . Then, use this article to reinstall iOS: If you can‘t update or restore your iPhone, iPad, or iPod touch . Note: This article is intended to be for a different issue but following steps 1-5 will help you reinstall iOS without erasing data.
Once you've reinstalled, test and see if you get the same result.