How to save PCG spawned foliage to Content Browser? UE 5.3

I’m using UE 5.3 PCG System to spawn foliage on my level

Then separating it into a separate actor using the clear button

I am then able to export this out of the engine through File > Export Selected > FBX

I want to be able to do this through code in an Editor Utility Widget so that I can automate this process

Does anyone know how to do this?