I find several comments in this forum where the authors say a toilet flange should be on top of the finished floor. There are also a couple of posts where in that case the poster had problems with rocking toilets due to insufficient space between the flange and toilet bottom. I have a copy of Code Check Complete which is a summary of four primary building codes. In there the authors have an illustration specifically showing the flange top level with the finished floor as being the correct installation and a big NO circle over the illustrations showing the flange on top of the finished floor and below the finished floor.
What I find of the plumbing codes the only code requirement is for the flange to securely fastened to surface below it.
Soooooo, what is the correct positioning of the flange to avoid clearance problems and still have a water tight seal?