Generally speaking, I would suspect a screen issue. In your case, you have tried a replacement screen. Is the replacement behaving exactly the same way as the original screen? If so, then I would suspect a logic board issue. The iPhone 6P is prone to suffering from Touch Disease. You can look it up on Google or click on my profile for a link to an article I wrote about it.
While you're symptoms are not the typical symptoms seen on Touch Disease afflicted phones, they are touch related and could have a similar cause. Ideally, you have to try a known-good replacement screen to isolate the issue to the logic board. A micro-soldering repair shop should be able to properly diagnose this problem.