I went bicycling this week and found that my Nokia 6 phone in my pocket would often unlock itself and start pressing icons/buttons on the screen by itself. I have a screen lock pattern. Sometimes when this happens, the phone app would start and the phone would start dialling a number. I would prefer that (a) the screen would accept input only after I've pressed the side button and (b) the screen should not accept any other input until I've entered my screen unlock pattern.
There appears to be some way that bypasses both these things -- other posts I have seen indicate that the home button unlocks the phone, and indeed it does, so perhaps something that would change the function of the home button to "take me to the home screen" only, would be nice.
Some people have given the advice to put the phone in your pocket the other way around, but that doesn't always solve the problem, particularly if the pocket is tight.
Other things that the phone did by itself, was enable data (not helpful on long journeys where you want to save battery life), enable flight mode (not helpful when you want others to track your location via Google Maps) and enable Bluetooth (battery life...). At least once, the phone cancelled Google Maps navigation.
By any chance, is your device's On-body detection setting activated?
Or perhaps you have something metallic within your pocket along the device?
True, the home button does wake up the screen but not even once the screen lit up on my device when it is on my pocket.