Well, it is true. God and Heaven are imaginary. Religion is not rational, its all about “faith”. So be it.
I have more faith in God than science, since medical science wasn't able to heal my Mom of a brain tumor that nearly killed her 10 years ago. Jesus did it. She's still alive and today in perfect health.
And "religion" does not equal "faith." I have great faith in God, but I didn't belong to any religion or denomination growing up.
Q. How can one determine what is real and what is imaginary?
All people have religious faith, including you. If you perceive that God is imaginary, and act accordingly. Then that is all about "faith".
You are acting in faith that your perception is real.