Parleoth:
I have a device that forces me to change the baud rate on the go from 115200 to 9600, send enter and then change back to 115200 again to continue communication.
I'm finding that very hard to believe, and I bet you don't, you just need a better understanding of what the hell you are doing.
Even in the unlikely event that it is true, this
xbee_serial.begin(115200);
is not likely to fix anything, indeed it will almost certainly be fatal. Software serial is only good for 38400 and, if you must run this device at 115200, you need to put it on hardware serial.
It might be time to re-think what this project is all about - and perhaps be more forthcoming on this.