@Mark *****
Your HR department is wrong. If you have an extension based on employment (rather than the initial Non B visa) the reason for the extension stops the moment your work ceases. You’d need to leave that day.
You can organise stuff if your employer agrees so that you can get a letter from them that you’ll be finishing on X date (usually 7 or so days). You go to the labour department to cancel your work permit and then immediately go to immigration to cancel your extension and they’ll give you a stamp to stay until X date.
If that doesn’t happen then when your work permit ceases you go to immigration and apply for an extension - which will be rejected and they’d give you 7 days to leave Thailand. It’s not an automatic thing. You apply and get refused for 1,900 baht but you get your 7 days to leave.