That's a tricky one depending on how you look at the circuit. With the Separately Derived System of a transformer only one neutral-to-case bond/earth bond is allowed. The bond at the main service panel is always the preferred location if the CT from the transformer is solidly bonded to the neutral bar inside the main panel to the ground/earth/neutral connection.The transformer secondary Ov C.T. referencing to earth ground in the OP drawing is shown earth connected, as it should.
However, grounding should be done right at the Transformer C.T. connection, again, per NEC/CEC.
Max.
https://www.ecmag.com/section/codes-standards/generator-grounding-and-bonding-essentials
If there is no switching action in the grounded (neutral) conductor through the transfer equipment, then the generator system remains grounded with the transfer switch in either position: normal or standby by the grounding electrode conductor at the service.

