I think there's some confusion here. The production canopy is also single piece canopy. The difference between it and the prototype canopies is the rail. The F-35 also features this rail. Obviously materials and coatings for J-20 and F-35 were developed much later compared to when the ATF program created the production F-22. USAF and PLAAF choosing to go with the rail included single piece canopy, when both USAF and PLAAF have non-railed versions proves that the railed version is a better choice overall.
It could be cheaper, safer, more reliable, more rugged, and various other reasonable assumptions. The fact rails are implemented for both of the respective latest 5th gen fighters should indicate there are good reasons for this and done so without sacrificing RCS. To say RCS spikes because of these rails is ridiculous. Why would they go all that way in every other stealth measure down to tapping edges and they completely ignore the canopy rail? Also if you can make a fighter sized machine stealthy, I'm sure you can design a rail to be stealthy as well. Perhaps use the same geometric, material, and whatever other measures.