Okay, now just going crazy.
Just for laughs I tried again to change from standby to sleep mode. At the beginning of the setMode function I entered the following code block.
if (newMode == RF69_MODE_STANDBY) {
newMode = RF69_MODE_SLEEP;
}
This time sending messages from the node to the Gateway and receiving acknowledgements seems to work almost every time. The only time it does not work is when the Gateway sends a message in return after every third message it receives from the node. I think this is some kind of race condition were both devices wait for acknowledgement from the other one. This means that the node usually does not receive the message being sent from the gateway.
Still, I call this progress :-)
Edit: I think some of the problems with the messages from the gateway was that I had turned on retries for the message from the gateway to the node. I remove this, and I get more successful messages from the gateway to the node. I also get rid of every third message from the node to the Gateway being unacknowledged. now, if I only could get more reliable messaging from the gateway to the node, everything would be perfect :-)