MKR 1010 Vin and USB in same time

Hello, I would like to use the Vin pin with external power (12V) and the USB connection in same time to can monitoring the system.
The Q2 SIA817 FET can be disconnect the USB 5V and the Vin 12V. Is it true?
I tried it and the MKR module and my laptop also died.

Which is the proper way, to do it?

I/O pins of the MKR1010 can handle upto 3.3V and Vin pin can handle 5V. Exceeding this rating might kill the MKR1010 board.