[Mac] Fix focus issues when using context menu

Fixes bug #20656 - Regression in file/directory renaming in the Solution Tree