Dumping an object in this way isn't always the best way to reveal the methods and properties it has.
The reason this doesn't work is id is actually a protected property (I think that's what the # means, in fact).
But something that is useful here is that it tells you that style is actually a Style object and if you're unsure of what the full class name is you can hover over the word Style. In this case it is XF\Style.
If you take a look at that class, hopefully it will become clear how to access the style ID.