How to connect GND between both sides of a signal transformer
The grounds have to be separate in this case.  If grounds were connected, you wouldn't have isolation.

During schematic capture, separate grounds means that you should use different nets for ground on each side.  It might look something like this.  Notice that the net for ground on one side is called PRIS_GND, and on the other side the ground is called PGND.  (The U2201 and U2202 are isolated DC-DC converters.)

 (source: author's archive)