How can I exclude blueprint code from release

As in this question for C++ - How to exclude debug code when shipping game - how can I compile out blueprint code from release?

I have some FDebugFloatHistory that are being compiled out for release, I would ideally like to do the same with the blueprint code interacting with them.

I’m also very interested in knowing if there’s a solution out of the box for this. We create a lot of debugging functionality and cheats during development that we’d like to disable in final builds. We’ll probably write our own code to do this, but it seems like something that should come out of the box.

You can use the Is Packaged For Distribution node for this.