Avrdude: ser_open(): can't open device "\\.\COM5": Access is denied

I’ve seen this problem pop up a few times now here in the forum, but I’m never able to reproduce it. Does the procedure at ESP32 & could not open port 'COM5': PermissionError(13, 'Access is denied.', None, 5) - #13 by yvesdelbrassine help?