Follow the instructions:
https://h30434.www3.hp.com/t5/Desktop-Video-Display-and-Touch/Lost-Touchscreen-Capability-When-Adding-a-2nd-Monitor-in/td-p/6847897
Head to control panel, hardware & sound, Tablet options.
From here select setup for screen 1 (main touchscreen) and then touch the screen at the prompt.
Next select screen 2 (smaller customer display) and hit ENTER and then ESC to set it as not touchscreen.
This will allow you to use the main screen as touchscreen again.