Starting from 3.11 Python has introduced a check to disallow mutable fields in dataclasses https://docs.python.org/3.11/whatsnew/3.11.html#dataclasses but it seems to only be enforced when there's type hinting?
What’s New In Python 3.11

Editor, Pablo Galindo Salgado,. This article explains the new features in Python 3.11, compared to 3.10. Python 3.11 was released on October 24, 2022. For full details, see the changelog. Summary –...

Python documentation