2019.1.2 Terrain grass looks different in Build and Editor

I’m using Unity 2019.1.2.

Everything is fine when I run the game in editor but when I make a build the grass on the terrain looks strange. To figure out what is happening I overrided all 3 shaders that unity uses for grass rendering: WavingDoublePass, BillboardWavingDoublePass and VertexLit. WavingDoublePass makes all colors blue, BillboardWavingDoublePass - purple and VertexLit - orange. All three shaders have Fallback Off.
Also I’m creating 2 terrains: the first one is created from script and anotrher I created in editor and added all 3 types of grass (meshes, billboards and vertexlit). And everything is right when I run the game in editor. But when I run the game from build one terrain (that was created manually in editor) looks fine, and another terrain (that is created from script) looks different. I cannot understand which shader is used for rendering grass. It is not WavingDoublePass, not BillboardWavingDoublePass and not VertexLit (because grass is not blue, not purple and not orange). I can see 4 different grass shaders in one frame.

4533073--420013--grass2.png

Anybody knows how it can be possible?

Ok, I created a small project that demonstrates the problem and code that I’m using for generating terrain and details. The script that creates terrain is attached to the main camera.

This is what we see in editor:

And this is what we see in build

The project is attached.

4537795–420652–TerrainTestProject.zip (113 KB)