Hello,
Sorry to hear you are having issues. I don't remember middle click can close an app on Windows 10. Is there specific application needed to run for that? On my system. I use Logitech Option for my Logitech mouse and I can set middle button to "Close Window".
Thank you,
Basj,
Stardock Community Assistant.