Finally found out how to do it: the option which you are looking for is Override browser shortcuts.
Go to Help and search for and enable the following option:
Override browser shortcuts
This option can also be toggled by going to the shortcuts screen. There will be a switch for it on the bottom.