Elizabeth II and now Charles III assigned Anne a lower spot in the order of precedence than Andrew and Edward, even though they are her younger siblings, and their justification (as explained in Parliament during the debate on the Counsellors of State amendment) is that she is further down in the line of succession to the throne (because of her sex).
Neither Philip nor Camilla were/are "regnant" (and I am sure that has been explained "umpteen times" in the media and forums as well

), so it is unrelated to that.