so the cement board and tub flange are not flush the flange sticks out a quarter to half inch on shower wall and at least an inch above it
The framing should've been brought out to 1/2" (or slightly less) from the flange face. The only correct solution here is to remove the cement board, shim out the framing, and reinstall it.
A gap is common, though an inch is fairly large. It can probably be filled with mortar if it's not repaired when the framing is fixed.