[SOLUTION]
You should uninstall tensorflow-macos and tensorflow-metal because the main reason for this problem is the version conflict between these.
After uninstalling, you should reinstall tensorflow-macos with target version 2.9 and install tensorflow-metal with target version 0.5.0 to fix this issue.
pip uninstall tensorflow-macos
pip uninstall tensorflow-metal
python -m pip install tensorflow-macos==2.9
pip install tensorflow-metal==0.5.0
Thanks 😇