Maintain layer in Grasshopper

Is there any way in grasshopper to maintain the inserted curve layers. so when we bake it, the layer structure maintains.

Certainly, passthrough the object properties. If you are in Rhino 8 you can use object properties, plugins such as Elefront or Human do this as well.