Other people on Reddit have reported the same issue.
https://www.reddit.com/r/iphone/comments/7bnann/iphone_x_screen_not_responsive_in_the_cold/
Sounds like a component, perhaps touch controller, is temperature sensitive and by locking/unlocking, the screen touch controller is reset and the problem is temporarily cleared up. Or, possibly the cold weather is causing the battery voltage output to drop below threshold where things start to malfunction.
iPhones back to the 4S have historically not fared well in cold weather and tend to shut down prematurely.
https://www.pcworld.com/article/249134/sub_zero_weather_can_your_smartphone_stand_the_cold_.html
https://www.reddit.com/r/iphone/comments/7bnann/iphone_x_screen_not_responsive_in_the_cold/
Sounds like a component, perhaps touch controller, is temperature sensitive and by locking/unlocking, the screen touch controller is reset and the problem is temporarily cleared up. Or, possibly the cold weather is causing the battery voltage output to drop below threshold where things start to malfunction.
iPhones back to the 4S have historically not fared well in cold weather and tend to shut down prematurely.
https://www.pcworld.com/article/249134/sub_zero_weather_can_your_smartphone_stand_the_cold_.html