Hi Filiupu and GuentherBasart, i think i got the solution for you because i just had it and i could solve it.
1st- Go to firewall advance security and in entry rules and exit rules check that Java™ SE is allowed, and same with BeamNG.(Has a green tick if allowed, if not is a prohibited signal) Right click,properties, and in the green arrows put allow connection.(As shown in the images below.)
2nd- When you have done that, uninstall BeamMP mod and restart your computer, when done that, install it again and check if works correctly.
Let me know if that worked out for you guys!