In addition to CCC 2779, which presents a problem I see as you do, there is CCC 370;
“In no way is God in man’s image. God is pure spirit in which there is no place for the difference between the sexes. But the “perfections” of man and woman reflect something of the infinite perfection of God: those of a mother and those of a father and husband.”
So it is problematic to think of God as being an old guy with a beard, at least as adults in the faith.
However, I think in children’s books it is fine as children are to be formed in the faith by their parents and when we speak of God as our Father it helps children to understand when they see an illustration like that.