This behaviour is indeed intended since shaders that don't match the `renderPipelineShaderTag` of the use `RenderPipelineAsset` are stripped out of builds (which leads to the incosistent rendering behaviour). Overriding this property in `TestRenderPipelineAsset` to match "UniversalPipeline" fixes the issue and both the editors and builds render the same result.
Despite this, it's true we should be more explicit about this stripping behaviour, so we're going to be adding some warnings and improving the docs for this! Thanks for the report!