I did a quick test of older versions and found that version 3.23.0 does not have this issue, but 3.24.0 does, so the problem seems to have been introduced in 3.24.0.
You can get version 3.23.0 from
https://download.calibre-ebook.com/3.23.0
I only tried one single small PDF for each test so this isn't a thorough check.
Update: 3.26.1 appears to fix this.