Remove and add foliage instance during the game doesnt work

I tried all the ways but it doesn’t work at all, I will leave my description in this forum.

https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1875586-help-me-to-add-function-in-the-class-script-foliage-foliageinstancedstaticmeshcomponent