Repository: flutter
Issue: [NavigationRail] Selected item does not gain focus while using tab + arrow keys to navigate.
Labels: framework,f: material design,a: desktop,has reproducible steps,P2,found in release: 3.7,found in release: 3.8,team-design,triaged-design

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) -->
2. Use keyboard to move focus (tab/arrow keys) between items.
3. Click on any item other than the focused one using mouse.

**Expected results:** <!-- what did you want to see? -->
The item that is selected should gain the focus,

**Actual results:** <!-- what did you see? -->
The item that is selected does not gain the focus.

<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'application',
      theme: ThemeData(useMaterial3: true),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Row(
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: const <Widget>[
          NavRail(),
          Expanded(
            child: Padding(
              padding: EdgeInsets.only(left: 4.0, top: 4.0, right: 4.0),
              child: Center(child: Text('Hello !')),
            ),
          ),
        ],
      ),
    );
  }
}

class NavRail extends StatefulWidget {
  const NavRail({super.key});

  @override
  State<NavRail> createState() => _NavRailState();
}

class _NavRailState extends State<NavRail> {
  late final ValueNotifier<int> indexNotifier;

  @override
  void initState() {
    super.initState();
    indexNotifier = ValueNotifier<int>(0);
  }

  @override
  void dispose() {
    indexNotifier.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return ValueListenableBuilder(
      valueListenable: indexNotifier,
      builder: (context, selectedIndex, child) {
        return NavigationRail(
          minWidth: 84.0,
          destinations: const <NavigationRailDestination>[
            NavigationRailDestination(
              label: Text('Home'),
              icon: Icon(Icons.home_outlined),
            ),
            NavigationRailDestination(
              label: Text('Search'),
              icon: Icon(Icons.search_outlined),
            ),
            NavigationRailDestination(
              label: Text('Party'),
              icon: Icon(Icons.group_outlined),
            ),
            NavigationRailDestination(
              label: Text('Purchase'),
              icon: Icon(Icons.shopping_bag_outlined),
            ),
            NavigationRailDestination(
              label: Text('Sales'),
              icon: Icon(Icons.store_outlined),
            ),
            NavigationRailDestination(
              label: Text('Accounting'),
              icon: Icon(Icons.account_balance_outlined),
            ),
            NavigationRailDestination(
              label: Text('Inventory'),
              icon: Icon(Icons.inventory_outlined),
            ),
            NavigationRailDestination(
              label: Text('Reports'),
              icon: Icon(Icons.text_snippet_outlined),
            ),
          ],
          labelType: NavigationRailLabelType.all,
          selectedIndex: selectedIndex,
          onDestinationSelected: (final int newIndex) {
            if (identical(newIndex, selectedIndex)) return;
            indexNotifier.value = newIndex;
          },
        );
      },
    );
  }
}
```

</details>

<details>
  <summary>Flutter Doctor</summary>

```
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.7.1, on Microsoft Windows [Version 10.0.19044.2486], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.4)
[√] Android Studio (version 2022.1)
[√] VS Code (version 1.75.0)
[√] Connected device (3 available)
[√] HTTP Host Availability

• No issues found!
```

</details>



https://user-images.githubusercontent.com/61322712/216810351-d2269001-b269-4b9c-9a9f-241cf1717cc8.mp4