When creating a new document directly in Microsoft Teams, Teams always opens the web version of the Office app that you are asking for (e.g. Word).
Please add a checkbox for Teams for open in Desktop App instead.

Note: It even ignores the setting in Teams to always open in the Desktop app:
