Your code looks ok, ignore the pycharm warnings, it uses a virtual environment and not your system library so it can’t find scapy. The important thing is that the scripts work in kali’s terminal.
Was your window vm up and running while scanning the network?
Can you show the results of:
ifconfig and route -n in kali
ipconfig in windows
Can you share a screenshot of the Network settings used in VirtualBox for both machines?