A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Dear Reviľáková Ivica,
Good day!!
First, we are sorry to convey that the moderators in this community are limited with the scripting and development scenarios, where we focus on the users concern with the out of the box scenarios.
However, as per the description shared, we understand your concern and we have done some search and noticed that when we use Delete() or DeleteObject(), the items will not be moved to the SharePoint Online site recycle bin and will be subjected to permanent deletion.
So, if you have already checked the Second Stage of the Recycle bin with no success, then I would like to suggest you to immediately connect with the related development team where they can check the from their end to see whether the deleted item can be restored with point time of restoration.
So, I request you to connect with your IT admin of your organization (How do I find my Microsoft 365 admin? - Microsoft Support) and raise a new service request from the Microsoft 365 admin center so that the related development team will connect with you to collect all related information and check from their end.
Reference: Get support - Microsoft 365 admin | Microsoft Learn
Appreciate your patience and understanding. Have a great day!!
Best Regards,
Sophia