IPhone switching to landscape mode after exiting apps?

Hope everyone is well. I have had my iPhone 6s Plus for a while now, however, a problem which has persisted is that randomly, after exiting an application and closing it from multitask, my phone switches to landscape mode and back to portrait mode, even though I'm holding my phone in portrait the entire time. This happens randomly and the orientation just flips to landscape mode without my even tilting the device, and then it goes right back to portrait mode. Does anyone else have this issue? I have restarted my phone many times, and I have also updated it with the new softwares; none of these seem to help. Any ideas?

My iPad does that occasionally.