This decision has been years in the making, seriously doubt that a single incident is more than a small building block for making that decision.
Erdogan interference in North Africa began shortly after the Arab spring. That's almost 10 years ago.
France realized their navy is not up to par. It is like a lap dog that is all bark, but doesn't have any power to bite:
After Turkish incident, France suspends role in NATO naval mission https://www.reuters.com/article/us-libya-security-france-nat...
France blasts ‘extremely aggressive’ Turkish intervention against NATO mission targeting Libyan arms
https://www.france24.com/en/20200617-france-blasts-extremely...
Turkey beats the french in Libya’s war // The U.N. dithers and Russia withers while Erdoğan flexes his Islamic muscle
https://www.amimagazine.org/2020/07/15/turkey-beats-the-fren...