The electronics will switch off as soon as the voltage drops to a pre-defined minimum. Turning the engine draws a lot of power so as suggested you could either have a battery problem or some resistance in the wiring or connections. You could narrow this down by running voltage drop test across the wiring using a volt meter and could also check the batteries. If you’re running two and still together and still find the instruments switch off, I guess the problem is in the wiring. Check the battery voltage is healthy at about 12.6V before the engine is started. It will be higher than this if the battery has been charged in the last few hours.
If you have two batteries and only a 1, 2 –both switch then you need to set it to “Both” to charge both batteries from then engine. If you have a split charge system the batteries shouldn’t be switched to both. Use one to start the engine and the other for the electronics. That way you’ll not run the risk of flattening both batteries.
By running split charge system, you effectively isolate the two batteries as soon as the engine is switched off. This allows you to charge both but only draw power from one, leaving the other ready to start the boat.