Could it not be possible that Fermat for a while thought he had a proof, and
then discovered a flaw in it, without bothering to erase that marginal note
announcing the proof (who bothers to correct marginal notes? or even
remembers them?)
If so, this would explain why he never published a proof of the Last Theorem
(because he realized he never had one).
Possible research topic: sift through what Fermat did publish or write to his
correspondents and see if anything fits as a counterexample or demonstration
of a logical fallacy in a would-be proof of the Last Theorem. If you find
anything plausible, then try to reconstruct the idea of the fallacious proof
from Fermat's announcement of the fallacy in it.