Start with the lower shift cable and shift interrupt switch. Most likely you need a new lower shift cable but it could be out of adjustment. The shift interrupt switch is only supposed to activate when coming out of gear but a bad or incorrectly adjusted lower shift cable could make the switch stick.
Just serviced the transom and the shift cable was also replaced and it has been adjusted. problem still persists.