its just best to leave that flange alone..
now if the pipe comming up inside the flange is sticking up higher than the flange, you can chisle it down some, ---beware --chips will go flying like little 22 cal bullets. --wear glasses.
leave the flange itself alone... its best to warm up 2 wax rings in hot water , and build up the seal some. its probably a 4 inch cast anyway and you should probably use at least two seals just to be sure ...
You would probalby be wise to shim it up in the back and see if that works.... tighten down the toilet to the shims and that should do it.
Best to let it lean to the front than to the back.....at least you cant see the shims that way and the gap is in the back.
Then it should be pretty solid, all ya got to do is use some
Dap white caulking and seal the unit down all around the bottom extra well and push the caulk into the gap with your finger..
This hides the gap in the back and beefs up the whole job.
wipe it off with a sponge andlet it set up
Dap works almost like elmers glue...once its set up , it aint going anywhere.