MTHFR testing

Ta

Has anyone been test for MTHFR gene mutation WHILE pregnant? I am 21 weeks and my sister just found out she has it. My doctor told me that I can’t get it done, and that I needed to do the tests before getting pregnant. I’m confused because a mutation is a mutation, right?