I have faced error in production mode while clicking on the custom menu in admin.in developer mode, everything works fine.
Fatal error: Uncaught Error: Call to a member function setActive() on boolean in vendor/magento/module-backend/Model/View/Result/Page.php:27 Stack trace: #0
After compilation, I have removed the generated folder and everything working fine in production and developer mode. so can I remove generated folder after compilation? is it right way or wrong.?