After simulation, are red and green still different colors?
Technically yes, as in the #5F537D versus #AFBC44 example under deuteranopia, they remain different hex values. The problem is not confusing one button for the other, it is that neither simulated color carries the "success" or "error" meaning the original color carried by convention.
Why isn't swapping in a 'safer' red and green pair enough?
Because in a genuine dichromacy the corresponding cone, L in protanopia, M in deuteranopia, is entirely absent, not just shifted, so no specific red-and-green pair escapes the simulation. WCAG 1.4.1 requires not depending on hue alone, not finding the "right" pair of colors.
Does an icon inside the button solve it without changing the color at all?
Yes, as long as the icon has enough shape contrast against the button background regardless of hue, a checkmark outline versus an X outline, for example. Shape recognition does not depend on any cone type, so it works the same under all three simulated conditions.
Does this test replace the WCAG minimum contrast check?
No. Distinguishability under simulated color blindness and minimum contrast ratio (WCAG 1.4.3 for text, 1.4.11 for graphical objects) are two separate checks: a button can pass one and fail the other, so both need to be verified independently.