You need 2 sets of conditions, I’m not sure if this is what you have. If those are all “AND” I’m not sure how the group is showing up anywhere.
post type = page AND
page template != template A AND
page template != template B
OR
post type = post
// also include page templates here if they can be used on posts