But presumably Mrs. Skywalker wouldn’t stick around once Anakin became a supervillain, so the only way to pull this off story-wise is to claim Anakin was “secretly” evil for some unspecified time period before the twins were born.
Alternatively, she was a baddie herself. Or worse, she was Anakin’s sex slave.