Navigation Menu with Dropdown - How to change the current state of the parent menu item of the dropdown?

How to change the current state of the parent menu item of the Dropdown inside of a navigation menu? The color of the “Test parent link” should stay green if “Test 1 or Test 2 link” is clicked but till now goes back to the original color blue.
Cleanshot_2024-03-21 _11-41@2x