Fix for this issue is now available in the latest update of InDesign 2020 – that is, InDesign 15.0.1
In the Creative Cloud Desktop application, click on the Updates section on the left. You should be able to see the Update available for InDesign. Please update your InDesign application to this version to try out the fix.
Let us know in the comments section if you face any problem with the updation process.
Adobe InDesign Team
An error occurred while saving the commentJohnny commented
This still isn't fixed. It doesn't fail all the time, but every now and then for no known reason Indesign will just toss an error and fail to generate/overwrite for an existing PDF. The messaging isn't very helpful either... it just says "failed to generate PDF."
Annoying it also destroys the original file in the process... the file simply "vanishes"... not in the trash. It's as though the file ceased to exist entirely. Super annoying.