mac, there are many answers because there are many difference kinds of equipment out there and they are not all built to the same spec. For instance:
IF your battery switch is a make-before-break type, and IF it has not worn out so that feature fails, then yes, it is safe to switch while running. (Notice, two IFs.)
The problem is that conventional alternators are wired up (IF you have a conventional alternator and IF it is wired up conventionally, two more IFs) so that the feedback to the alternator is designed to cause more power to be generated when there is less (i.e. no) power coming back form the battery. Normally that's a good thing, low battery means give it more power. Except, if you break the connection, the alternator says "Gee, that poor battery really is dead, I'd better run flat out" and 15-30 seconds of that can be enough to burn out an alternator.
Except ...some of the new alternators have protection built into them, and they don't care about a momentary blink/loss in the feedback. Some of them have spike and surge protection built in too. Others will shut down if the battery voltage drops to ~10.5V and won't let you recharge the battery until someone gives you a jump to reset them.
More protections, more "brains".
Some battery switches (odds are yours isn't) don't just use "make before break" but they also use a second set of contacts for "field sense" lead to make sure that feedback wire is switched to whatever battery you are using.
Confused yet? That's why there's a lot of different advice, you need to know exactly what equipment you have, what it can accept, how it is wired, and then verify that it IS actually wired and working correctly.
The alternative is to always assume the worst, and never switch batteries while the engine is running. That way, no matter what the equipment is or whether it is malfunctioning, you can't hurt it.
As to why your starting battery isn't always getting charged...that's a whole other issue to pursue. Could be a bad diode, a diode isolator was installed, a bad cable or corrosion...I'd use and run JUST on that battery, while troubleshooting just that battery, to see if it isn't something "local" in just that part of the wiring. (Which could include the connection to the battery switch, or a thinner longer cable, or an older one that's rotting inside...all sorts of simple things.)