Limits of this quirk
Small aside, the mention of the quirk not working because somebody could simply change their mind has not been confirmed. The reason why his quirk did not reveal the betrayal was because he asked Himiko and Twice if Shigaraki had asked them to infiltrate and betray them... So he simply asked the wrong question. Had he asked Himiko and twice if they planned to betray them, the two would bno doubt have revealed what they planned to do.
Neither Toga nor Twice are planners, and they were only following Tomura's orders to help Overhaul. You could easily tell they had no intention of betraying Overhaul before (which is why they were both roleplaying as "gangsters") and only started doing their own thing once they became frustrated with The Shie Hassaikai (pages 6 and 7 of chapter 148).
You can read chapter 148 to see what I mean. They didn't really understand why Tomura told them "I believe in you two", only realizing it by the end of 148. This is what we call a Batman Gambit.