I sometimes need to access the anchor as a block attribute using parse_blocks. I do so my saving the value of the anchor as an additional custom attribute. (Saving it with the attribute name “anchor” breaks all blocks which haven't been converted yet.)