Scrum guide states in the section "The Scrum Team" that
The Scrum Team consists of a Product Owner, the Development Team, and a Scrum Master. Scrum Teams are self-organizing and cross-functional.
Now let us see the section "Development Team Size". In here the Scrum guide states that "The Product Owner and Scrum Master roles are not included in this count unless they are also executing the work of the Sprint Backlog.".
Thus, if Product Owner and Scrum Master are not mandated to execute sprint backlog, then how the Scrum team is cross-functional?