My experience is not mine personally...just thru friends. The only legal problem they ran into was when they were taking whatever licensing examinations (2 female dentists & 1 female physician). The name they put on the examination had to be their legal name & the one on the official ID that allowed them to enter the examination. So...you have to allow enough time for your DMV to get your ID to match your legal name, if you choose to change.
However...there are many female prescribers who do change their name after licensing. I know because of their DEA #. That # always begins with either an A or B & is followed by the first letter of your last name at the time you apply for it. Many female prescribers have a DEA # that will begin with BL, for example (her maiden or previously married name @ the time of licensure was Lee perhaps) then later she married or remarried & the new name is Smith....but the DEA # never changes....it stays BL.
So...you can graduate with whatever name you want & change it at any time you want. It can be at the time of marriage, 1 yr, 10yrs or never.
I married while in school & changed my name at that time, so I graduated & became licensed with my married name & our kids have our name.
I will add....it does sometimes become awkward with treating children. I never know if the woman whose name is different is the mom, stepmom, nanny, aunt, caregiver...so I just ask how they are related to the child. I'm sure they're used to it & no one has ever given me a hard time.