In for a dime, in for a dollar.
I can't remember which happened first, but I am making the assumption that Mike cracked Nacho's safe before Gus realized that Lalo was alive.
First thing we need to remember is that It was Don Eladio (through Juan Bolsa), not Gus, who unleashed the dogs on Nacho. You'll remember that Lalo introduced Nacho to Don Eladio, which is how the cartel knew that Nacho was a traitor when they couldn't find him after the ambush. Gus, knowing that this was a possibility, set up the switching of the safes. (If Mike knew that the information about Nacho's hotel would be planted in the safe, I would expect that Gilligan and Gould would have had him bring up the issue with Gus. On the other hand, it's not like Mike to plant something without knowing what it is. This is a very weak construction, jmo.)
So, we need to assume that Gus would have been okay with Nacho being killed at the hotel. (The phone call with Tyrus confirms this.) Why try to kill Nacho at the hotel after passing up the opportunity to have him killed at the ambush? The hotel information was planted in the safe before Gus knew that Lalo had survived, so the reason for planting the information which set up the shootout at the hotel doesn't rely on the fact that Lalo is alive. The only thing I can think of is that Gus, by allowing Bolsa to discover Nacho's location, is encouraging Bolsa to believe that Gus had nothing to do with the attempted hit on Lalo. Gus has plausible deniability that he has any knowledge of Nacho's existence. I'm just now thinking that Mike has convinced himself (and therefore Gus) that there was zero chance Nacho would allow himself to be taken alive. (This kinda sorta addresses the concerns in the last sentence of my previous paragraph.) Gus gave Nacho a fighter's chance to save himself but making it too easy for Nacho to escape would surely raise suspicions within the cartel. The cartel will now take Bolsa's discovery of the hotel as being evidence that Gus was not involved on the attempted hit on Lalo. Also, Nacho was identified as a traitor because he met with Eladio; it’s plausible that the hotel shootout would not have happened had this meeting not taken place.