Editing level sequencer at runtime

I need to add keyframes at runtime inside a level sequencer in order to run a rigid body animation created by reading position from a json file.
I’m following this tutorial from epic(Sequencer Scripting Foundations | Tutorial) according to which is possible to access the animation channels in development builds, but my cast fails at runtime while working in editor mode.
I ask if it is possible to actually add keyframes at runtime, either via BP or C++, maybe there is some bp or project settings that needs to be done in order to work also in dev builds (not shipped)