The error is a bug in drawing layers on the landscape.

when you start drawing with a HARD brush, it draws with a transparent layer, but if you erase the first layer, it begins to display the texture normally without transparency. And yet, when you make the first click on the landscape next to the brushstroke, it suddenly hits a different texture. What could it be? The code and bug on the video. Thanks for the reply.

https://www.youtube.com/watch?v=bkw3nseRhTk

https://www.youtube.com/watch?v=bkw3nseRhTk