@Sefton Two weeks isn’t a law, it’s a courtesy. That sometimes just doesn’t work (says the dude who gave three days’ notice…).
If there’s anyone at your work who you’d like to keep in touch with after you leave, tell them privately ahead of time. I’ve appreciated it when others did that.