Terrain layers not visible in build

Only first four terrain layers are visible in build. Rest of them appears black. Terrain layers appear normally in editor.

Unity editor 2023.2.20f1
hdrp 16.0.6


Unity 2023.2 is not a LTS version, I would recommend to try to upgrade to 6.0.

Also, this seems to be a very bad way to use terrain, you should instead use textured quads/planes with the 8 textures that you have, in a tilemap manner.