tiny_mce_before_init: ‘exact’ => true has no effect

Your code is working exactly as it should. The style_formats filter allows you to add additional styles via class names. It is perfectly valid for an element to have multiple classes (and is not limited to only two).

I’ve been working with the tinymce editor for years; and I can honestly say I have no idea what the “exact” argument does, exactly. I have never had a situation where it made a difference. BUT, I can say with certainty it does NOT limit an html element to only have one class.

If what you are trying to achieve is a way for a user to enlarge/reduce the font size; then you should re-consider your approach. I would make two new editor buttons (perhaps up and down arrows); and write the code to enlarge or reduce the font-size of the element.

Alternatively, you could create three new editor buttons (one for each font size), that when clicked, removes any existing font-size class on the element, and adds the new one.

In summary, I do not believe your current approach will limit an element to a single class name. I would consider a new approach. There are plenty of articles out there detailing how to add a new editor button.