I think the old injunction that uk railway companies were not allowed to build for external sale would have prevented it (the LNWR built a batch of locos for the L&Y in the 19th century and upset the loco builders, following which all agreed to stick to their respective spheres).
What they might well have done was provide drawings to one of the established loco manufacturers.
Over a thousand McIntosh designed/inspired locos were built for Belgium. The first of them were direct copies of the Caledonian Dunalistairs, which the caley hadbuilt in house at St Rollox, but the belgian locos were built by Neilson Reid to Caley drawings. Subsequent orders went to continental builders.
If a GSR W mogul was to be built, it'd most probably be supplied by an outside builder.
Crewe building for the DN&G or The various LMS works building for the NCC was fine as they were wholly owned subsidiary companies, and thus building for their own consumption, so to speak.
I imagine the GNR(I) building railcar parts for the donegal was OK as they were part owners, or because it was too obscure and small for anyone to take much notice!