First of all it's impossible to know which is correct. So instead you look at the effect on people.
Second truth isn't everything - it looks that way, but when you run a civilization entirely on truth it fails, and can not survive.
I have a feeling you're not going to understand this, it took me years to understand it - I wanted only truth, and was utterly miserable, until I understood that truth isn't everything (and I'm not talking about religion BTW).
Sometimes believing something that is wrong gives a better outcome. Which is more important? The truth? Or the outcome?
Don't answer quickly - philosophers have been arguing about this for millennia. I chose truth and was miserable. I recently changed my mind.
When you run a civilization (whatever "running a civilization" means) based entirely on truth (the facts of reality) it cannot survive? How's that? And, by the way, what's the alternative to that? Lies, wishes, and general irrationality? How's that working out?
Or if people around you knew every single thing you thought about them. Or if your parents knew every time you misbehaved.
Civilization would not survive such a thing. You need the lies. A world where people could not (or would not) ever lie would not function.
There are all sorts of issues. This one is important to quite a few people.
'what produces a better moral compass' is not very relevant to you if you are trying to find a rational basis for you beliefs or a lack thereof. It is relevant if you are an American that fears the rise of atheism or atheist politicians, judges or cops. It is relevant if you are an agnostic that can't or won't decide on a position but needs to decide if a 'religious foundation' is better for their kids.