something isnt right with the solar set up, the controller, or the connections of it into the system of the boat....
ive done a few solar set ups, both on boats and small shore based systems, and when they connect in, there should never be a conflict, especially 40 amps worth... maybe a faulty circuit breaker?
the solar controller and the charging from the panels is passive to to other more powerful charge sources that the boat may have, and as long as these other sources arent on and working, the MPPT solar controller works just like a smart charger and puts the right voltage and current thru to the batteries.... when another stronger charge source becomes active, such as when you plug into shore power and your onboard charger turns on, the more powerful output of the onboard system will be dominant, and as it powers the system, the solar charge controller will see this as the system being full and no more charge is needed at this time, and will shut down to float mode as the main charger does all the work.
as high tech as the solar panels and charge controllers are, the way they connect to the grid, and the way we see it operating is very simple and basic.... if there is a conflict, I would check for polarity issues, shorting issues, or a faulty charge controller.