I tried changing all three positions of the switch. I also isolated the third ground pin with some tape, but the problem still persists. If I shutdown the laptop right after I turn it on, it turns off normally, but if I open some files in the HDD (caddy) and let them run for a while, modificate them, the shutdown freezes at the last bit and leaves me with a black screen.
Maybe putting an SSD into the caddy instead of the HDD would work, I am not sure, but then I encounter another problem with Boot options, where everytime I get Bios screen and have to manually select it to boot from windows boot manager: ssd