@TechWitchLivyTTV I asked Copilot and this was its reply
F1 24, being a video game developed by Codemasters and published by EA Sports, likely restricts the use of Wireshark for several reasons:
Security and Fair Play: Online multiplayer games often prohibit external tools like Wireshark to maintain fair competition. Allowing packet analysis could lead to cheating or unfair advantages.
Game Integrity: Game developers want to ensure that players experience the intended gameplay. Wireshark could potentially alter game data, affecting the integrity of the experience.
Privacy Concerns: Wireshark captures network traffic, including sensitive information. Allowing it in-game might compromise players’ privacy.
Performance Impact: Running Wireshark alongside a game consumes system resources. Developers may restrict it to optimize performance.
Remember that these restrictions are common in online games to maintain a level playing field and protect the overall gaming experience!
So i guess its anticheat that forces the game to close.