The mechanic is not a part of the fiction, and so by definition cannot be diegetic.
More generally, if X represents Y, and Y is part of the fiction, it doesn't follow that X is part of the fiction.
And not all parts of a mechanic in a RPG are representational. What does the d20 roll represent...