I’ve noticed recently that when connecting a device to the mask input of a secondary device, if you disconnect the mask on the secondary device it unbuilds the device with the mask applied (expected behavior) but also unbuilds the device that was connected to the mask. I believe this to be a bug, as disconnecting the output of a device doesn’t change any parameters within it, so there shouldn’t be any need to rebuild the device afterwards.
To replicate to see if there’s something I’m missing, it’s easy enough. Just take, for example, two advanced perlins. Pipe the first into a curves device and the second into the mask of the curves. Build the terrain. Disconnect the mask from the curves, and you should see that both the curves and the second advanced perlin have been unbuilt.