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

That sounds like a bug. If you want to open an issue in the Parse Server repo with a simple code example to demo the issue.