Unexpected :slave.call/4 or :peer.call/4 behaviour

RPC afaik works by having a process on the other node execute your code. That process starts and links your genserver. Then the process executing your code stops, so the genserver stops as well, as it was linked to that process.

Cast might work by accident if the process executing the first cast has not been stopped / and brought down the genserver before the call is executed.

You either want to start the genserver without linking it to the caller process or even better start it as a child of some supervisor running on the other node.