A block with a render callback and no save function

A block whose output depends on data that changes after the post is saved cannot store markup, and returning null from save is how you say so.

// index.js
registerBlockType( metadata, {
  edit: Edit,
  save: () => null,      // nothing goes into post_content
} )

The comment delimiter is still written into the content with the attributes, which is what lets PHP re-render it — the block is not absent from the post, only its markup is. This also removes the block validation problem entirely: a dynamic block cannot become invalid when its markup changes, which is the main reason to prefer it even when the data is static.