After some more reading here:
https://learn.microsoft.com/en-us/windows/wsl/networking
I was sort of right when I said I need to enable some firewall setting. WSL1 lets you do networking out of the box, but WSL2 requires you to port-forward your desired ports. It looks like I have to connect each station to each neighbour manually. For example, if I have a network with 2 stations with ports 4002 and 4004, I have to make a rule that connects 4002 to 4004, and another one for the reverse. I also have to connect the web server ports, so another 2 rules for those ports. It seems very tedious, and I'd have to tear it all down if I ever reset the network for testing.
It sounds like switching to WSL1 is the best idea.