The AUMF was an addition to WP so Iran's lack of support for AQ doesn't limit normal WP operations. Additionally sectarian concerns are more malleable than presented. As an example review Iran's long-standing support for Hamas which is Sunni-affiliated.
—Consistent with section 8(a)(1) of the War Powers Resolution, the Congress
declares that this section is intended to constitute specific statutory
authorization within the meaning of section 5(b) of the War Powers
Resolution.
https://www.congress.gov/107/plaws/publ40/PLAW-107publ40.pdf