I'm using WhatsApp on my phone and desktop, and for some reason it has started booting me out of both unless I am in the phone application
This is the way it is meant to work. When it the app is minimised, it will run in background but won't show you as online. All messaging apps like allo, WhatsApp, hangouts do this. This is not a problem or a bug.
You have a setting in your phone that kills any closed app instead of keeping it in the background. I don't remember exactly how to find it and it probably varies with different phones, but it certainly the issues and not something wrong in WhatsApp app itself.
Check whether you have activated restricted data usage in Settings -> Data usage depends on phone.