Disable the card menu without disabling the context menu

I want to disable the card menu in the browser but my attempt to disable it with the code

def removeMenu(browser):
    browser.form.menu_Help.deleteLater()
    browser.form.menu_Notes.deleteLater()
    browser.form.menu_Cards.deleteLater()

Makes an error message in the context menu that opens by clicking on a card.
I want the context menu to continue to appear as usual even though the card menu does not appear at the top.
Thanks