Ah, I see. I tried it out and get the result there.
The problem is that resources aren’t accepted for icons for subpages. It’s not called out clearly in the documentation, but the definition of the icon property for sub pages is this: “The URL of the icon.” It only accepts icons hosted elsewhere.
You can see this in the built page (note the src:
<img src="resource:icons;example.svg" class="_1bsbgktf _4t3igktf">