You need to remove the code we’ve provided if that is the case. It’s only a workaround if you want to close the canvas after clicking the menu. Further tweaking it to open the submenu will be getting into custom development. You might want to consider using a different menu for this or use UberMenu which has a lot more options than the menu systems in Pro. See https://theme.co/apex/forum/t/extension-ubermenu/75/1 for more details.
If you want to continue with custom code, we do have an in-house custom development team that offer paid services, who may be able to assist. They can be contacted at pinnacle@theme.co if this is of interest to you.
Thank you for your understanding.