The targeted enemy can't make opportunity attacks
As you've quoted, the relevant part of the Swashbuckler rogue's Fancy Footwork feature description says (SCAG, p. 135; XGtE, p. 47):
During your turn, if you make a melee attack against a creature, that
creature can’t make opportunity attacks against you for the rest of
The only requirement for the feature is that you "make a melee attack" against a creature on your turn; it doesn't specify that the attack has to hit (or miss), so it doesn't. Therefore, if you make a melee attack against a creature on your turn, then that creature can't make opportunity attacks against you for the rest of that turn. That's all there is to it.
Rules designer Jeremy Crawford reiterated this fact in an unofficial tweet from May 2016:
does the Fancy Footwork feature of the Swashbuckler rogue require the melee attack to be successful?
Fancy Footwork works whether or not your attack hits.
This tweet just repeats what's already self-evident from the feature description: you just have to make the attack - you don't have to hit.
As a sidenote, Fancy Footwork doesn't even require an attack roll, since it doesn't mention hitting or missing; it just says you need to make a melee attack against a creature. This means that even trying to grapple or shove a creature is enough to qualify for the benefit of Fancy Footwork, since both shoves and grapples are described as "special melee attacks".
This fact is also reinforced in a Q&A about the interaction of the third benefit of the Mobile feat, which works similarly (as you note): Does a Grapple or Shove count as an attack for the third benefit of the Mobile feat?