Sounds like a software glitch or some strange setting overlooked. It's a common issue with early EV models especially from newer brands they're still ironing out the kinks.
Hopefully, they'll push an update to fix it because draining the battery when you're supposed to be charging is just plain wrong.
In the meantime, you might want to try playing around with the climate control settings, maybe there's a "pre-conditioning" or "battery saver" mode hidden in there somewhere. But yeah, ultimately, it's something they need to address with a software update.