Remember, the bombing of the embassy in Beirut happened the night before we invaded Grenada. We were fighting proxy wars against the Soviets on several fronts.
If Lebanon was not ready to take on Syria, then it was a stumble to go in to start with. Either Reagan wasn’t advised well, or he made a decision and backed off on his own. I tend to think he wasn’t advised well, but that’s conjecture.
I do think Iraq was an evil empire in it’s own right. I believe it was part of a breeding ground of terrorism. I support what we have done there.