Why isn’t the Copy Code button working in Inspect?

If you’re using Safari, clicking Copy Code in Inspect selects the text and then displays an instruction telling you to copy.

This is different from Chrome, which directly copies the text to the clipboard. This is a limitation of Safari.