dont drag image after lost focus

I move the image – drag and drop. Everything is fine until I put the cursor in the input type ‘password’ – it stops working. If I click the mouse near to the image, it starts working again. Moreover, the input type ‘text’ does not affect it. Can this be fixed?

I tried a lot – changed the code, removed pieces of code, until I discovered that the problem is exactly when I put the cursor in an input type”password”
By the way, Firefox doesn’t have this problem!
https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_draganddrop2
i insert here input type’password’ and the same problem…