Mongodb disk space release problem

I delete the data in the collection in the mongodb v3.4.24 stand-alone version, and the experiment shows that the disk space will be released immediately.

In the mongodb v4.4.5 replica set, I deleted the data in the set. Experiments show that the disk space will not be released immediately, and the disk space needs to be reclaimed after performing compact on each node.

I would like to know what is the difference between the stand-alone version and the replica set, why the stand-alone version can immediately free up disk space, is there any official documentation?