(I’m in the UK, laws may be different in your jurisdiction, etc.)
Edit: https://uk.adp.com/resources/adp-articles-and-insights/artic... says that
> Employers can take legal action if an employee breaches their notice period by leaving without providing the required notice period. They might pursue a claim for breach of contract, seeking damages for the cost of hiring temporary contractor replacements or loss incurred by a sudden departure.