Most people, even those that build their own bikes from kits, don't know enough about the stuff to tell the difference.
Most authorities don't care, as long as you are riding like a bicycle in places a bicycle should be and look like a bicycle.
When hooning around in ways authorities might take exception to, they might stop you for that, and at the same time go ahead and check what you're riding to see what other tickets they can give, or see if they can arrest or shoot you just because.
When riding things that don't look like typical bicycles****, authorities may become interested just because of that--whether they do anything about it or not depends on the individuals and any directives they may have from above (and how much they care about those).
A few places actually check for things with random roadside stops, but I've not heard of this here on the forums from California yet.
****(It's been years now, but I've had a few stop me on CrazyBike2 or the SB Cruiser trike, to see what it was, but I think it was more curiosity than anything else. As soon as they could see they have fully functional pedals that I'm using, and all the lighting/signals/etc, they usually thank me for that and my riding safely and go on, since they *are* just ebikes by the definition of when and where they were built, regardless of their appearance.
and I'm riding like a bicycle where bicycles should be, at bicycle speeds)