MKR 1300 and Windows 10 Upload problems

Do you have COM4 open in any other applications? If so, you need to close that before uploading. Only one application can have a serial port open at a time.

If not, try restarting your computer. Sometimes there is some glitch that causes a port to get stuck open.