Indesign 16.4 macOS 11.5.2 (also checked on 10.15.7)
Problem with file export (with the same file name, overwrite)
I will describe it using the example of export to jpg/png
Step 1. Open/create any indd file Step 2. Export file to jpg with resolution 72 dpi (just in case) Step 3. Export again to jpg with the same name and smaller resolution
File size does not change, but it's a new file with new pixel dimension
Repeat Step 3 with different file name - all ok. New jpg with smaller resolution and smaller file size
Export again, with larger resolution - all ok. New file are bigger both in file size and resolution.
If you already have a larger file with the same name, the new file is written in it's place, but the file size remains the same (like the existing file). If you write a file with a new name, the file size will be correct.