The word you're looking for is "fiction", and the moral of a story isn't diminished simply because the story is fictional. Parables, allegories, fables, myths, and fairy tales often contain truth despite not having actually happened. The opposite happens too, where the occasional real life anecdote is believed to contain some general truth despite being a one-off occurrence.
When I heard the story, it was represented as a real life experience, not a fable, not fiction.
Since you're going there, there's a lot of people who claim to be Christian who would be kind of surprised if you said that it didn't matter if Jesus never existed. Same for Muslims with Muhammad, and Buddhist with Buddha.
There’s a certain type of person who smugly debunks the factual elements in a fable from Aesop or a fairytale. I understand some people are rather literal, but…come on.
It's illustrating a point. The truth the meme demonstrates is still very real.