In reply to Bibin Paul:
Hi Bibin,
The #0 delay is not executing at the end of simulation but in the “inactive” region.
And could you please specify more about your purpose.
The cummings paper “SystemVerilog Event Regions, Race Avoidance & Guidelines” will help you to understand the SV event regions.