You need to install a vented loop in the intake line. Whoever installed your toilet for you apparently missed that in the installation instructions.
You didn't say which make/model electric toilet...if it's one that uses a hose to connect the base to the back of the bowl, it needs to go between the pump and the bowl...so you'll need to replace that hose with a enough hose to put the loop at least 6-8" above waterline AT ANY ANGLE OF HEEL--which is 2-3 feet above the bowl on most sailboats.
If it's a model that doesn't have that connecting line from the pump to the bowl, you'll have to put the loop in the intake line between the thru-hull and pump...and THAT's gonna require adding a solenoid air valve wired to the flush button that closes the air valve when the toilet is flushed, opens it again to break the siphon started by priming the pump. You can see how that works here:
37068-2000 Vented Loop Solenoid Valve It says it's for Jabsco's 37010 series toilet, but it works with any electric sea water toilet that needs a vented loop in the intake.