I think the difference is that it's really hard to tell how difficult SWE work is and whether or not someone's doing it (since the real work is all in the brain). So it's comparatively easy for a fraudster to skate on very little knowledge/ability for a long time. When this happens with doctors or pilots we call it a major motion picture. When this happens with SWEs we call it Tuesday.
Why SWEs aren't required to document their process of problem solving? Like "I have problem X, I intend to solve it in that way, first thing I did is google that shit, found this article, compared those libs, picked that one because these and these reasons, etc.". Yeah, it can be painful and unusual first time but when it's mandatory it can make probably the best habit a professional can have.
This would help everyone from SWE itself (by tracking problem solving process) to his manager, colleagues and everyone who will work after and it's a ready draft for a blog article that'll say more about them than any CV.
It's not particularly easy to do, the parts that don't lead to a solution are boring, and people may make nitpick criticisms that aren't at all helpful.
I work at a place where design documents are supposed to include the alternatives that were considered and rejected, for much the same reason, and this does work to an extent, but it's not quite what you're suggesting.