Yes. AXS allows you to mix and match road and MTB AXS drivetrain components as long as you use the compatible cassette and chain for your rear derailleur.
Check out the AXS Component Compatibility Map for more information, or reach out to our Rider Support Team.