In the recent animated movie Batman: The Long Halloween Part 1, Selina Kyle accidentally calls Batman Bruce, and thereby revealing his identity to Alberto Falcone (this is obviously different from the comics). Indeed Alberto dies within the next few seconds but Batman's identity was for a moment revealed by Selina's stupidity.
The second instance is from Justice League (both Joss Whedon's and Synder's versions). When Superman is resurrected using the Mother box, he attacks the Justice League and Lois arrives on time to stop him:
Lois Lane: Clark! Clark!
Military Officer: Whoa, whoa! Hold your fire, hold your fire!
[Lois steps in front of Batman. Clark's heat vision deactivates.]
Lois Lane: Clark... Please. Please. Please. Just go. Let's go.
[Clark leans into the hug, then takes off with Lois in his arms.]
Justice League : The Snyder cut (2021)
[Before Superman can crush Batman's chin, Alfred arrive with "the big guns": Lois Lane. She steps out of the limousine and speaks to Superman]
Lois Lane: Clark? Clark. Please... Please. Please, just go. Yeah? Let's go.
Justice League (2017)
Although in this instance, we do not know if someone actually made the Clark Kent - Superman connection.
There have been quite a few instances where super villains have discovered Batman and Superman's secret identities either by deduction, educated guess or by sheer luck. However in both instances mentioned above, either emotions (and/or stupidity) made someone reveal Batman and Superman's secret identity.
I don't remember seeing anything like this in the comics but, have there been such instances when Batman and/or Superman's identities have been mistakenly revealed?