BUG: v1.3.0 Introduces Unexpected Retyping of Categorical Column with NaN inside
### 

- [X] I have checked that this issue has not already been reported.

- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.

- [X] I have confirmed this bug exists on the master branch of pandas.


### Reproducible Example

```python
# Bug in v1.3.0 and later
import pandas as pd
import numpy as np

print(pd.__version__)

X = pd.DataFrame({
    "a": pd.Categorical([np.nan], [1]),
    "b": [1]  # comment this out and it will return a categorical in 1.3.0
})

mask = X["a"].isna()
X.loc[mask, "a"] = np.array([1])
print(X["a"].dtype)
# int, but should remain a category
```


### Issue Description

In the above reproducible example, using pandas v1.3.0 will return a int64 type. However, the column was initially a categorical type.

The behaviour is very esoteric. In v1.2.5, this code works properly and keeps the categorical type. If the column "b" is removed, then it works correctly in v1.3.0. If the np.nan is replaced with a value such as 1 in the "a" column, this code works correctly.

After performing a `git bisect`, the offending commit is 80227439db6b90985b9fbcde2a8f8ea85a4569b2. Its parent (4ecba519dc4d93f6524bde102c97b5ebb91aa3ae) returns a category. Something in 802274... introduces this bug.

### Expected Behavior

The last print returns a category type, not an int64 which is the correct and expected behaviour.

```python
# Works correctly in v1.2.5
import pandas as pd
import numpy as np

print(pd.__version__)

X = pd.DataFrame({
    "a": pd.Categorical([np.nan], [1]),
    "b": [1]
})

mask = X["a"].isna()
X.loc[mask, "a"] = np.array([1])
print(X["a"].dtype)
# category
```

### Installed Versions

<details>

INSTALLED VERSIONS
------------------
commit           : 80227439db6b90985b9fbcde2a8f8ea85a4569b2
python           : 3.9.7.final.0
python-bits      : 64
OS               : Darwin
OS-release       : 20.6.0
Version          : Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:27 PDT 2021; root:xnu-7195.141.2~5/RELEASE_ARM64_T8101
machine          : x86_64
processor        : i386
byteorder        : little
LC_ALL           : None
LANG             : None
LOCALE           : None.UTF-8

pandas           : 1.3.0.dev0+435.g80227439db
numpy            : 1.21.2
pytz             : 2021.3
dateutil         : 2.8.2
pip              : 21.3
setuptools       : 58.2.0
Cython           : 0.29.24
pytest           : None
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : None
IPython          : None
pandas_datareader: None
bs4              : None
bottleneck       : None
fsspec           : None
fastparquet      : None
gcsfs            : None
matplotlib       : None
numexpr          : None
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : None
pyxlsb           : None
s3fs             : None
scipy            : None
sqlalchemy       : None
tables           : None
tabulate         : None
xarray           : None
xlrd             : None
xlwt             : None
numba            : None

</details>
