I think the regime and many of its supporters view American military power in a very different light, like much of that region. They basically view America as a paper tiger - number one in technology, weapons, etc., and very much able to inflict much short-term damage; but with no will or staying power, no faith (in the religious sense) in the justness of their cause, and no legitimate business being in the region in the first place. They look across the region over the last 40 years and take great heart from all the various ways the people of the region have stood in defiance of American power - the embassy crisis, Beirut 1982, Saddam’s survival in 1991, Mogadishu 1993, Israeli humiliations in Lebanon in 2000 and 2006 and the survival of besieged Hamas since 2007, the utter mess made of Iraq since 2003, the survival of Assad since 2011, and the humbling of the Saudis by the Huthis in Yemen since 2015. Combined with their very real sense that God is not only on their side but working through them, I think they’ve concluded that ultimately America can and will collapse and withdraw from the region just as the Soviet Union did before them, and the British and French did before them.
That’s not to say they can’t or don’t operate on a pragmatic basis often enough, or that they’re actively looking for a bigger confrontation at this particular moment. But it may be enough reassurance in the back of their minds to test the Americans in such ways until the right time comes.