If you want it to always automatically reveal the currently opened file in the Project sidebar, you can go to the Project panel, click the ... menu then Behavior -> Always Select Opened File