I raised two special-needs sons who likely qualify for a diagnosis of ASD but never got a formal diagnosis because I homeschooling them, so I didn't need an official diagnosis to accommodate their needs.
Human children are raised for many years and a large part of social stuff is learned behavior. Some things can be explicitly taught to people whose brain wiring disinclined them to innately pick it up on their own.
Girls are socialized differently from boys and it seems likely they are just expected to "get" social things even if they don't. They either get someone to explain it or they try harder than boys to cover up their deficits because it's more socially unacceptable.
Not everything can be taught. Some social difficulties can be rooted in things like a lack of prosody or lack of ability to tone match can be extreme priblematic and cannot be fixed, at least not that I know of.
But some things can be explained and to whatever degree it's learnable, if girls are simply more expected than boys to learn it, it's not unreasonable to suggest ASD is likely underdiagnosed in girls.