Q: Why the Portfolio drop-down menu is inactive on the project details page? How can I activate it?
A: Current user should have the "Project - Edit" permission enabled in the project:
Once the above requirement is fulfilled the Portfolio field becomes editable.
The solution is to include the user to the portfolios or enable the "Manage all portfolios" permission in the user's global role.