The bug is seen here, pasting from the top chem plant onto the 2 bottom ones before (left) and after (right):

Tested both shift+left/right click and ctrl+c (which shows an incorrect preview when pasting on the left). The misbehaving input orientation is functional (factory works).
In addition, copy-pasting the affected building leads to the correct i/o orientation when pasted:

Which also applies if the offending building is deconstructed then reconstructed via ctrl+z.