I was raised Christian (and actually was involved in the church til my late teens as a choirgirl), and I think it can work, but you have to be careful where you push or it starts to feel "preachy". The Narnia books are a good one to look at, because they work in places, but not so much in others.
Generally, Narnia works (at least prior to the end of the last book) by having a great Fantasy story where there's a magic lion who is hinted (often not too subtly) to be Jesus. There's a great analogue to the Crucifixion in The Lion, the Witch and the Warderobe that doesn't feel obvious if you're not looking for the parallels, and the messages Aslan and the heroes espouse about honesty, redemption, forgiveness and hope feel universal enough to be enjoyed by pretty much anyone.
Where Narnia tends to fall down for me is when it stops just being about general spirituality, metaphor and ideals about being a good person, and starts explicitly laying out that "Yes, Aslan is Jesus" and "If you don't know him, you can't really be good". For example, even as a christian child, it grated on me that the narrator felt it necessary to say that Eustace is an entitled brat because he went to a secular state school and so wasn't familiar with Christian teachings. Or how at the end of the series, we're meant to be happy that the characters all died in a freaking train crash because they're in heaven now, while oh... that silly Susan wanting to have a life and stuff and be an adult woman who has love and sex instead of an eternal child, she doesn't get to die in a train crash, poor thing!
I think the line may be when you go past the greater spiritual themes and lessons of Christianity and get bogged down in some of the specific patriarchal and exclusionary dogma. Like nobody's going to mind if there's a character who espouses the importance of forgiveness and charity, and perhaps makes a heroic sacrifice on behalf of a group of people. But if you put in somebody who is like... bad because they're not in the good religion and who immediately turns good on embracing it, or say... there's an evil gay person trying to seduce the good guys to their debauched atheist ways and whose evil stems from being detached from the light of the one true god.... Or you have a character who insists an abused child must "honour their father and mother" while the narrative frames them as right because it's in the Bible.... this is where it starts to feel preachy and uncomfortable. The general themes of Christianity tend to be decent enough; don't hoard money, be kind to people, take a day off once a week, don't take revenge etc. It's usually the more specific dogma that's often barely in the bible but widely used to oppress others that people take issue with like "abortions are always wrong", "having sex without having been married by a priest is evil", "having literally any other beliefs, even just being the wrong sect of Christianity means going to hell", that people have issue with, as well as things like using Christian priest imagery for good guys uncritically, presenting all priests as kind, trustworthy authority figures, ignoring all the coverups of Child Abuse and similar. Priests are ultimately just people; I've met some who were lovely, kind, wise people, and some who were absolute assholes.
In other words, if it's just metaphor rather than an advert for Christianity, and the lessons you're trying to teach are things people generally across most cultures can vibe with because they're just generally good life lessons or morals, there's generally not going to be a problem.