AfterSave trigger is executed even before transaction is committed to database

As the topic suggests, the afterSave is getting executed even before the transaction in database