Samsung Galaxy S6: Back button presses by itself
Had same problem. I did a factory reset which solved nothing, i tried the code which resets touch screen sensortivity.  No joy.  It's hardware. If your phone is under warranty take it back.  My cell was not so took it too local repair shop. They replaced a strip that runs around perimeter of my cell. This strip contains the sensors on the bottom of the cell and the side as well as the charger port.

Problem solved. Hope this helps