It's a brand new Nokia 8, running Android Oreo 8.
When the phone is lying down on the table, the touchscreen becomes somewhat unresponsive. The effect is increased when it's plugged in for charging.
If I touch the screen, the touch does not register on the correct point, or if I draw a line, it breaks off into multiple dots or dashes. On picking the phone up, the issue sort of disappears.
I don't remember the brand name of the tempered glass screen guard I have, but I think it's of good quality, and do not believe it's an issue.
I contacted Nokia support via the built-in app, and their response is that I should bring it to a service center for a close examination. I will do so later.
I'm keeping this question here for posterity. Maybe somebody will know what's going on.