As mentioned I only used your code, compiled it in kali and ran it in windows. There’s no trick or anything extra. Just disable defender before running it and make shure your windows machine has internet access.
Maybe try with this article to permanently disable defender:
Hope it helps!