WPF is processing your triggers in declared order. In the second example the foreground is ever so briefly changed to green. But then the IsMouseOver trigger runs and sets the color back to yellow.
IsMouseOver has no relationship to IsPressed in terms of precedence. What’s important is the declaration order in XAML of the triggers.