You are not copying everything entity has, especially for trains, which have names, stations, interrupts, colors and other settings, that are lost.
Try placing down ghost of a quality locomotive that was copied from existing locomotive with customized settings. You lose everything due to not copying everything needed:
local info = {
        name = entity.quality.name .. "-" .. entity.name,
        position = entity.position,
        quality = entity.quality,
        force = entity.force,
        fast_replace = true,
        player = entity.last_user,
    }
    entity.destroy()
    surface.create_entity(info)