@lin So, in essence, you’re worried writing God in a fantasy story could be idolatrous?
Yeah, that’ possible. However, I’ve never seen any significant difference between expressing who God is through a story and expressing who he is through a sermon. There’s a chance of idolatry in a sermon too.
So you need to be careful that whatever you say about God in your story is something you could comfortably say outside of your story.
I’ve included God as a character in my fantasy world because it’s very theocentric. The theme requires his existence and benefits from his limited screen time.
However, if God is in a story but he isn’t explored through that story, I would question why he’s there.