awaitReplication only waits for the lastAppliedOpTime. After calling awaitReplication, the commit point could still be behind. For prepared transactions testing, we have awaitMajorityCommitted which waits for the commit point as known by the primary.
We should change standalone_replication_recovery_idempotent.js to use awaitMajorityCommitted.
And it seems that it is a common mistake to use awaitReplication in prepared transactions testings, maybe we could also move the logic in awaitMajorityCommitted to awaitReplication to have it also wait for the commit point.