Hi @Bnilath,
Thanks for your posting.
You could select the folder which you deleted the file by mistake, then click Deleted items icon, and selected the deleted file, click Restore btn:

Here is the version history before deleted a document in Plans or its subfolders:
before deleted in Plans
Here is the result if you restore a document for Plans or its subfolders:
after restored in Plans
Here is the version history before deleted a file in Project files folder or its subfolders:
before deleted a file in Project files folder
Here is the result if you restore a file for Project files folder or its subfolders:
As you see above, you will get the complete version history after restored a deleted file by mistake.
Thanks,
Zijing