As far as legalities and potentialities are concerned, you got great responses from @Boiler and @SalishSea, two members way more qualified to give them than myself.
While you didn’t ask for advice, I am still going to take the liberty to ask a few questions/provide some perspective:
Have you considered what it will mean for M to be here in the States, unable to work, unable to drive (most likely, at least for a few weeks), and unable to leave the country in case of an emergency back in Europe?
Have you familiarized yourselves with how long AOS (and even EAD/AP) takes these days?
Have you discussed alternative routes, i.e. getting married and then filing I-130 with the goal to obtain a spousal visa?
The AOS limbo is often underestimated, especially by people who are used to having a routine (job, school, etc.) and having at least some independence (being able to get around -> driving, etc.). I have personally been through it when processing times were still somewhat bearable, and I wouldn’t do it again. Yes, long-distance relationships are difficult, and being “on hold” like that isn’t fun. However, AOS can put a real strain on y’all’s relationship, and while the short-term gain (yay, we can stay together in one place) may seem to outweigh the potential problems, it is worth considering them.
As it seems right now (and I have no proof of that), USCIS seems to gear up to discourage AOS, which may mean even less resources will be provided for that part, and that may make the whole process even longer than it already is. Just something to consider.
Unsolicited statement: if it were me, I would seriously consider getting married, getting all the forms for I-130 ready, and submit them once F has naturalized. Yes, it means long-distance for a while longer, but especially medium to long-term, it may pay off.
Best of luck to both of you, and I hope your naturalization date comes soon!