Interplay of stellar and gas-phase metallicities: unveiling insights for stellar feedback modelling with Illustris, IllustrisTNG, and EAGLE | Synapse