text: Title: Palette does not support the use of defaultdict with missing values
  Body: Currently, Seaborn does not permit the use of defaultdict with missing values as a palette. A minimal example that reproduces this issue is:
  
  ```python
  import seaborn as sns
  import pandas as pd
  from collections import defaultdict
  
  data = pd.DataFrame({
      "values": [1, 2, 3],
      "hues": ["foo", "bar", "baz"],
  })
  
  palette = defaultdict(lambda: "#000000", {
      "foo": "#ff0000",
      "bar": "#00ff00",
  })
  
  sns.histplot(
      x="values",
      data=data,
      hue="hues",
      palette=palette,
  )
  ```
  
  My expectation is that this should use the default value of `#000000` for `baz`, which is missing from the palette. Instead, this raises an exception:
  
  ```python-traceback
  Traceback (most recent call last):
    File "/home/ehermes/test/seaborn_defaultdict.py", line 15, in <module>
      sns.histplot(
    File "/home/ehermes/venvs/seaborn/lib/python3.10/site-packages/seaborn/distributions.py", line 1384, in histplot
      p.map_hue(palette=palette, order=hue_order, norm=hue_norm)
    File "/home/ehermes/venvs/seaborn/lib/python3.10/site-packages/seaborn/_base.py", line 838, in map_hue
      mapping = HueMapping(self, palette, order, norm, saturation)
    File "/home/ehermes/venvs/seaborn/lib/python3.10/site-packages/seaborn/_base.py", line 150, in __init__
      levels, lookup_table = self.categorical_mapping(
    File "/home/ehermes/venvs/seaborn/lib/python3.10/site-packages/seaborn/_base.py", line 234, in categorical_mapping
      raise ValueError(err.format(missing))
  ValueError: The palette dictionary is missing keys: {'baz'}
  ```
  
  For this test, I have used `seaborn-0.13.2` and `matplotlib-3.8.2`.
  
  I have a fix for this problem in a personal branch (https://github.com/ehermes/seaborn/tree/palette_defaultdict), but per your contribution guidelines, I have opened a bug report first. With permission, I can also create a PR for my fix.