Muhammad doesn't exist? Who else doesn't exist, Caesar of the Roman Empire? George Washington of the USA? If I don't like one I could say he never existed, right? In the end, I wasn't there to see them!
https://en.wikipedia.org/wiki/Muhammad
Maybe Muhammad did not do all the things people say he did, but to say he's invented is going a bit far. You don't like the idea that he existed so you say that he never existed... just like the people saying the world is only 6000 years old and God planted dinosaur bones to test us because they can't accept the reality.
Again, as I said, I find both types of cartoons offensive, but if you're all in favour of full free speech, you should accept even the Holocaust jokes. You can't just shun away things you dislike and laugh at things you like even if hundreads of millions find it offensive.