How can I hide sold out variants in Dawn theme 11.0?

Could you please provide a screenshot? I’m currently relying on that code, and it seems to be functioning correctly. It’s worth noting that after adding the code to the custom liquid, you have to click “Save” and refresh your theme editing page to see the results.

Just to clarify, this is a demo.