It’ll stay with the car.
Edit - sorry read the question wrong. It depends on if it went thru Tesla at any point in time during from when sold with FSD to when your friend bought. If your friend bought it from the original owner, yes it’ll stay. If it was bought from a dealer that got it...