you can inset a label into the resin, or a metal plate with an engraving on it. Or engrave any of the other embedded metal parts already in the frame for connection with the outside world.
Yes, this is a solvable problem. My hunch is that there’s no incentive for bike manufacturers to deal with this. If there were permanent serial numbers that could be attributed to the owner, they’d have to respond to thousands of requests for verification.
The registration is with the police. The bike manufacturer just has to stamp a serial number on the frame