Looking at the code, I think the "inline" processor just uses the object's properties when parsing the tag. Since 'id' isn't a property, the tag ends up empty and is then removed. I thought adding the ! would tell the processor to leave it alone, but apparently not. This could possibly work:
Even it it does, though, I don't think there's any advantage over putting it in a chunk, since when processing the inline value, MODX actually creates a new chunk and then processes it. As a bonus, you can edit the chunk with Quick Update, which you can't use on the inline value.