Retraction of Dismissal: Can a Company Revoke a Dismissal Letter Already Communicated and Dismiss Again Days Later?

The retraction of dismissal occurs when the employer, after notifying an employee of their dismissal, decides to revoke that decision before it produces its definitive effects.
Pre-employment agreement: How binding are job offers for companies?

What happens if, before signing the contract, the company decides not to formalize the hiring or even withdraws the offer altogether?