Repository: kubernetes
Issue: Naming controller fails to update `NamesAccepted` again once it turns false
Labels: kind/bug,sig/api-machinery,triage/accepted

### What happened?

`naming` controller is not able to update the `NamesAccepted` condition even after the `SingularConflict` issue is fixed.

This code here - 
https://github.com/kubernetes/kubernetes/blob/56d7898510f2a973f92fda13c2ba3a5e756d9621/staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go#L249-L251

returns nil when `Spec.Names` is equal to `Status.AcceptedNames`.

Ideally, it should also check if `NamesAccepted` condition is not true and then trigger the reconciliation.

If [this](https://github.com/acumino/kubernetes/commit/5b66dd884bab7e85100383e1ba44c29aa934b525) fix is fine I can open the PR.

### What did you expect to happen?

Once the duplicate name is removed from the card Names, `naming` controller should update the `NamesAccepted` condition to `True`.

### How can we reproduce it (as minimally and precisely as possible)?

1. Create a CRD that has `plural` and `singular` names different.

```bash
cat <<EOF | kubectl create -f -
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: bugs.crds-k8s.io
spec:
  conversion:
    strategy: None
  group: crds-k8s.io
  names:
    kind: Bug
    listKind: BugList
    plural: bugs
    singular: bug
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        type: object
        x-kubernetes-preserve-unknown-fields: true
    served: true
    storage: true
    subresources:
      status: {}
EOF
```

2. Ensure the CRD conditions are healthy and the `status.acceptedNames` is same as `spec.names`.
```bash
kubectl get crds bugs.crds-k8s.io -o jsonpath='{.status.conditions[?(@.type=="NamesAccepted")]}' | jq
{
  "lastTransitionTime": "2023-11-16T06:38:12Z",
  "message": "no conflicts found",
  "reason": "NoConflicts",
  "status": "True",
  "type": "NamesAccepted"
}
```
```bash
kubectl get crds bugs.crds-k8s.io -o jsonpath='{.status.acceptedNames}' | jq
{
  "kind": "Bug",
  "listKind": "BugList",
  "plural": "bugs",
  "singular": "bug"
}
```
3. Update the CRD spec by making singular name equal to plural
```bash
cat <<EOF | kubectl replace -f -
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: bugs.crds-k8s.io
spec:
  conversion:
    strategy: None
  group: crds-k8s.io
  names:
    kind: Bug
    listKind: BugList
    plural: bugs
    singular: bugs
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        type: object
        x-kubernetes-preserve-unknown-fields: true
    served: true
    storage: true
    subresources:
      status: {}
EOF
```
4. Check that the CRD condition `NamesAccepted` is now failing, but `status.acceptedNames` is not equal to `spec.names` which is expected.
```bash
kubectl get crds bugs.crds-k8s.io -o jsonpath='{.status.conditions[?(@.type=="NamesAccepted")]}' | jq
{
  "lastTransitionTime": "2023-11-16T06:51:29Z",
  "message": "\"bugs\" is already in use",
  "reason": "SingularConflict",
  "status": "False",
  "type": "NamesAccepted"
}
```
```bash
kubectl get crds bugs.crds-k8s.io -o jsonpath='{.status.acceptedNames}' | jq
{
  "kind": "Bug",
  "listKind": "BugList",
  "plural": "bugs",
  "singular": "bug"
}
```
5. Fix the CRD by making singular name not equal to the plural name.
```bash
cat <<EOF | kubectl replace -f -
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: bugs.crds-k8s.io
spec:
  conversion:
    strategy: None
  group: crds-k8s.io
  names:
    kind: Bug
    listKind: BugList
    plural: bugs
    singular: bug
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        type: object
        x-kubernetes-preserve-unknown-fields: true
    served: true
    storage: true
    subresources:
      status: {}
EOF
```
6. Check that the CRD condition `NamesAccepted` is still failing even though the issue is fixed.
```bash
kubectl get crds bugs.crds-k8s.io -o jsonpath='{.status.conditions[?(@.type=="NamesAccepted")]}' | jq
{
  "lastTransitionTime": "2023-11-16T06:51:29Z",
  "message": "\"bugs\" is already in use",
  "reason": "SingularConflict",
  "status": "False",
  "type": "NamesAccepted"
}
```

### Anything else we need to know?

_No response_

### Kubernetes version

Based on the code, the `master` branch seems to be affected

### Cloud provider

<details>

</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>