Sorry, I missed that this was about GM mode. There is a big caveat about using Osiris/story scripting in GM mode, although it does not apply to your particular situation (yet). While GM mode does not block or interfere with Osiris/story scripting directly, it completely reinitiases story every time you load a game. This means that any databases that were set, are gone (I've added a warning about this on https://docs.larian.game/Osiris).

You are not setting any databases in your code, so that is not the issue here (although ProcCharacterFollowCharacter does use databases, so you should not use it in GM mode). The "follower" state is part of the game state rather than Osiris, so even that should keep working (assuming you get it to work in the first place). I don't think anyone can help further by seeing the actual code and dialog though.

The reason for the limitations regarding combining Osiris/story with GM mode is that GM mode is all about full control for the game master. If Osiris starts interfering, this becomes impossible. E.g. if you have an NPC following through Osiris and the NPC then gets possessed by the game master, both systems will start fighting because Osiris commands go straight to the game engine just like player input. But again: I can't think of a reason why you would not be able to do this right now, it should just result in an awkward situation in case you try to possess the follower later.

I know there has been talk internally about functionality character following in GM mode because it's indeed something a lot of people want to do. I don't know if there are any concrete plans yet though, but I would expect that in the end this will be something that is controllable by the GM from the GM interface (so there is a GM-specific follower state, which can be disabled by the engine as soon as the GM possesses a follower).