Here's my GH ID: https://github.com/ChrisMarshallNY
You can easily see that I faked over a decade of checkin history, dozens of repos, in multiple organizations, over 20 shipped apps, lots of blog posts, tutorials, class modules, etc.
I don't know the context of how that came up, but I'd probably let the recruiter know of their unprofessional behavior if that happened to me.
In my case, since I had been experiencing veiled insults and condescension from almost every interviewer (and being "ghosted" by recruiters, when they find out my age), I just said "Bugger this for a lark," and decided to retire early.
I doubt anyone misses me, but I am pretty sure that I could have helped at least one of the companies from going titsup.
I know that my generation (and the one before) have caused many issues, but I'm not your typical "OK boomer."
There good cause for "the law" in daily reality (as opposed to "The Law" as an abstract good) not to be held in any esteem by ordinary folk.
But it is not enforced. Tech companies don't bother to hide it at all. They run job ads that all but say "Bros only."
When money is being made, the authorities tend to look the other way. That has been going on in the finance industry for decades (and don't get me started on crypto).