Forcing a class name on to blocks in WordPres block editor

I’m trying to add a class name to all the basic blocks generated by the WordPress block editor on the front end. I need to know they came from the editor and not another custom block or somewhere else on the website. So I’m only applying styling to a Paragraph tag block and not a paragraph tag that’s been adding manually in the footer or from a embed or the like.

I understand this should ideally be done in theme.json where available, but I can’t find any example to do this, and if I just copy how things like color work by looking at the block.json and modifying the className it doesn’t work. And as always WordPress block documentation is lacking.

{
    "version": 3,
    "settings": {
        "blocks": {
            "core/paragraph": {
                "className": "wp-block-paragraph"
            }
        }
    }
}