sklearn PCA rotates a single vector

### Describe the bug

The issue we recently discovered is that sklearn PCA rotates the input when only a single variable is fed into the model.  

I am aware there are infinite rotations when there is a single vector fed into the model, however, the output from PCA should intuitively make sense. So I suggest hard coding this scenario (which I guess already done in R)


### Steps/Code to Reproduce
```python
import numpy as np
from sklearn.decomposition import PCA

x = np.array([1,2,3,4,5,6,7,8,9,10.]).reshape(-1,1).astype('float64')

p = PCA().fit_transform(x)
p
```
### output:
```
array([[ 4.5],
       [ 3.5],
       [ 2.5],
       [ 1.5],
       [ 0.5],
       [-0.5],
       [-1.5],
       [-2.5],
       [-3.5],
       [-4.5]])
```

as we see here the value 4.5 is corresponding to the smallest value in the set (1) and the value -4.5 is corresponding to the highest value in the input set (10).

### Expected Results:
```
array([[-4.5],
       [-3.5],
       [-2.5],
       [-1.5],
       [-0.5],
       [ 0.5],
       [ 1.5],
       [ 2.5],
       [ 3.5],
       [ 4.5]])
```



### Steps/Code to Reproduce

```
from sklearn.decomposition import PCA

x= np.array([1,2,3,4,5,6,7,8,9,10.]).reshape(-1,1).astype('float64')

p = PCA().fit_transform(x)
p
```

### Expected Results

```
array([[-4.5],
       [-3.5],
       [-2.5],
       [-1.5],
       [-0.5],
       [ 0.5],
       [ 1.5],
       [ 2.5],
       [ 3.5],
       [ 4.5]])
```

### Actual Results

```
array([[ 4.5],
       [ 3.5],
       [ 2.5],
       [ 1.5],
       [ 0.5],
       [-0.5],
       [-1.5],
       [-2.5],
       [-3.5],
       [-4.5]])
```

### Versions

```shell
System:
    python: 3.11.4 | packaged by Anaconda, Inc. | (main, Jul  5 2023, 13:47:18) [MSC v.1916 64 bit (AMD64)]
executable: e:\Users\***\miniconda3\python.exe
   machine: Windows-10-10.0.22621-SP0

Python dependencies:
      sklearn: 1.3.0
          pip: 23.2.1
   setuptools: 68.0.0
        numpy: 1.24.3
        scipy: 1.11.1
       Cython: None
       pandas: 2.0.3
   matplotlib: 3.7.1
       joblib: 1.2.0
threadpoolctl: 2.2.0

Built with OpenMP: True

threadpoolctl info:
       filepath: E:\Users\***\miniconda3\Library\bin\mkl_rt.2.dll
         prefix: mkl_rt
       user_api: blas
   internal_api: mkl
        version: 2023.1-Product
    num_threads: 8
threading_layer: intel

       filepath: E:\Users\***\miniconda3\vcomp140.dll
         prefix: vcomp
       user_api: openmp
   internal_api: openmp
        version: None
    num_threads: 16

       filepath: E:\Users\***\miniconda3\Library\bin\libiomp5md.dll
         prefix: libiomp
       user_api: openmp
   internal_api: openmp
        version: None
    num_threads: 16
```

COMMENT:
I came across this problem as well, comparing it with my own implementation of PCA using `numpy.linalg.svd()`, it seems that `sklearn`'s PCA is negating the first principal direction only.

### Code to reproduce:
```python
import numpy as np
import seaborn as sns
from sklearn.decomposition import PCA
import sklearn.datasets as datasets
import matplotlib.pyplot as plt

dataset = datasets.load_diabetes().data

X = dataset * (np.sqrt(1/(dataset.shape[0])))
U, S, Vh = np.linalg.svd(X)
V = Vh.T # principal (column) vectors matrix: calculation using numpy
print("Singular values from numpy SVD:", S, sep="\n")
print()

pca = PCA(n_components=2)
pca.fit(dataset).transform(dataset)
V_scikit = pca.components_.T
print("Numpy calculated principal directions:", V[:,0:2], sep="\n")
print()
print("Sklearn's calculated principal directions:", V_scikit, sep="\n")

plt.figure()
sns.scatterplot(x=V_scikit[:,0], y=V_scikit[:,1], label="sklearn PCA")
sns.scatterplot(x=V[:,0], y=V[:,1], label="My PCA")
plt.suptitle("Note that the x values are mirrored(negated), that is first principal direction is negated")
plt.show()
```
### Output:

```
Singular values from numpy SVD:
[0.09541776 0.05810584 0.05223438 0.04649421 0.03870592 0.03692713
 0.03484178 0.03132381 0.01331145 0.00440093]

Custom calculated principal directions:
[[-0.2164309   0.04436721]
 [-0.18696688 -0.3865472 ]
 [-0.30316216 -0.15628128]
 [-0.27173773 -0.138266  ]
 [-0.34325511  0.57302691]
 [-0.35186068  0.45594185]
 [ 0.28243681  0.50623907]
 [-0.4288337  -0.06818072]
 [-0.37861802 -0.026187  ]
 [-0.32218296 -0.08494884]]

Sklearn's calculated principal directions:
[[ 0.2164309   0.04436721]
 [ 0.18696688 -0.3865472 ]
 [ 0.30316216 -0.15628128]
 [ 0.27173773 -0.138266  ]
 [ 0.34325511  0.57302691]
 [ 0.35186068  0.45594185]
 [-0.28243681  0.50623907]
 [ 0.4288337  -0.06818072]
 [ 0.37861802 -0.026187  ]
 [ 0.32218296 -0.08494884]]
```
![image](https://github.com/scikit-learn/scikit-learn/assets/107769130/79d2bdb6-8d0b-4245-b52b-8e6010b63a2d)

### Environment:
```
python                    3.10.13
numpy                     1.26.2
scikit-learn              1.3.0
```

Labels: Bug