Will we be able to file jointly this year (as a resident alien married
to a nonresident alien)?
Yes, if you use the "Nonresident Spouse Treated as Resident" election. See this IRS page and the relevant section from Publication 519 (e.g. the 2021 one is here). This will cause both of you to be treated as resident aliens for the whole year, and require you guys to file as Married Filing Jointly. If you do not use this election, you guys can only each file as Married Filing Separately, because nonresident aliens cannot file jointly.
Note that treating your spouse as a resident alien for the whole year will cause her worldwide income from the whole year to be subject to US taxes (whereas nonresident aliens are only subject to US taxes on their US-sourced income). However, she will likely be able to use the Foreign Earned Income Exclusion on foreign income from before she came to the US, and she probably had little foreign income after she came to the US anyway.
Will the US-China tax treaty deduction still be applied to our joint
income?
If you are talking about the income tax exemption in Article 19 (teachers, professors, and scholars are exempt from all tax) or Article 20 (students are exempt from tax on the first $5000 of income) of the US-China tax treaty, yes. However, my understanding is that it can only apply to your spouse's income, and not your income (i.e. the amount of income claimed as tax-exempt cannot exceed the portion of your joint income that was made by your spouse), as only she is eligible for those tax treaty provisions, and not you.
Although there is a "saving clause" in Protocol 1, paragraph 2 of the treaty, which allows the US to tax its residents notwithstanding the treaty, which would normally mean that resident aliens cannot use the tax treaty, Articles 19 and 20 are among the articles that are excepted from the saving clause:
Except as provided in paragraph 2 of Article 8, paragraph 2 of Article
17, and Articles 18, 19, 20, 22, 23, 24 and 26 of this Agreement, the
United States may tax its residents (as determined under Article 4).
This fact is mentioned in the technical explanation for the US-China tax treaty, in the sections for Articles 19 and 20:
This article is excepted from the "saving clause" of paragraph 2 of
the Protocol, so its benefits are available to persons who otherwise
qualify even if they become U.S. residents.
If she is treated as a resident alien, and her employer fails to subtract the tax-exempt amount from her income on her W-2, you guys would have to file W-9 to report the tax treaty claim, and enter the tax-exempt amount as a negative amount on the "other income" line on Form 1040 Schedule 1. See the section "Students, Apprentices, Trainees, Teachers, Professors, and Researchers Who Became Resident Aliens" in Publication 519:
How to report income on your tax return.
In most cases, you will not need to report the income on your Form
1040 or 1040-SR because the income will be exempt from U.S. tax under
the treaty. However, if the income has been reported as taxable income
on a Form W-2, Form 1042-S, Form 1099, or other information return,
you should report it on the appropriate line of Form 1040 or 1040-SR
(for example, line 1 in the case of wages, salaries, scholarships, or
fellowships). Enter the amount for which treaty benefits are claimed
on Schedule 1 (1040), line 8z. Enter “Exempt income,” the name of the
treaty country, and the treaty article that provides the exemption.
Combine the amounts reported on lines 8a through 8z on Schedule 1
(Form 1040) and enter on line 9. Then, combine the totals from
Schedule 1 (Form 1040), lines 1 through 7 and 9 and enter the total on
line 10. Then, enter the total from Schedule 1 (Form 1040), line 10,
on Form 1040 or 1040-SR, line 8.
Example.
Mr. Yu, a citizen of the People's Republic of China, entered the
United States as a nonresident alien student on January 1, 2017. He
remained a nonresident alien through 2021 and was able to exclude his
scholarship from U.S. tax in those years under Article 20 of the
U.S.-People's Republic of China income tax treaty. On January 1, 2022,
he became a resident alien under the substantial presence test because
his stay in the United States exceeded 5 years. Even though Mr. Yu is
now a resident alien, the provisions of Article 20 still apply because
of the exception to the saving clause in paragraph 2 of the Protocol
to the U.S.–People's Republic of China treaty dated April 30, 1984.
Mr. Yu should submit Form W-9 and the required statement to the payer.