This script no longer works, unfortunately - when dynamically instantiating light-mapped prefabs using the method in the ReadMe, the incorrect lightmap is sometimes assigned to the prefab (with the incorrect lightmap index.)

The two lighter corridors are dragged from the project explorer into the scene with correct lightmaps. The two darker corridors are the same prefab and are instantiated at runtime. They have the incorrect lightmap attached to them.
The correct prefab lightmap:

The instantiated at runtime lightmap:

Unity 2022.3.9f URP
This script no longer works, unfortunately - when dynamically instantiating light-mapped prefabs using the method in the ReadMe, the incorrect lightmap is sometimes assigned to the prefab (with the incorrect lightmap index.)
The two lighter corridors are dragged from the project explorer into the scene with correct lightmaps. The two darker corridors are the same prefab and are instantiated at runtime. They have the incorrect lightmap attached to them.
The correct prefab lightmap:
The instantiated at runtime lightmap:
Unity 2022.3.9f URP