Being paid the same as the other guy doesn't necessarily mean the wages themselves stayed the same. Adding H1B candidates to the talent pool exerts downward pressure on salary due to the law of supply and demand. I can't say for sure whether the allure of a green card or threat of deportation play a material factor in lowering the average salary that H1B immigrants are willing to accept. But in an environment where talent is treated as fungible (even if it isn't always so), any such downward pressure affects everyone.
The prevailing wage for H1B software engineers is a very good salary for most software engineers in the world.
It's common for the prevailing wage to be double what that person could earn in their country of origin.