The 90 day rule applies to all pilots carrying passengers but as you correctly say, crew members i.e. students are not passengers if occupying a pilot seat. Its not a case of instructors being exempt, they are not; but if they are not carrying passengers, the rule does not apply. Article 255
‘Passenger’ means a person other than a member of the crew;