I've not looked at that bit yet, so what my assumption on what happens internally in the GTA5 engine:
- You get into the customs
- Do the things you want to do
- You're done
- Game generates a new car, with a new internal ID which is at that point not hooked to your player until 'refreshed' by putting it in the garage and generate a new version of the car again.
I'll take a look at the code soon™ and see if I can improve things.