I'm on 1.18.2
I ran dedup on a frame folder, it said 'difference from frame 00000001.png to 00000002.png: 1,97% - Deleting. Total: 0 kept / 1 deleted' then proceed to delete the whole folder with over 115000 frames.
[edit]
1 small update: I tried several different settings: tried changing the threshold to 1% (was 2% I think, the default value) - same; changed threshold to 4% - (obviously) same; tried the 'only analyse, don't delete' option - same (it deleted the whole folder yet again); copied a bunch of random frames to a folder (absolutely different from one another), renamed them to 00000001, 00000002, 00000003, 00000004, etc. (15 frames total) it said 'kept 15 frames, deleted 0 frames', but deleted the whole folder again.