Your personal Tumblr library awaits
The contrast between Kaito's dynamics with Shinichi and Hakuba respectively is so important to me you don't understand
Shinichi/Conan doesn't know who KID is under the mask. I doubt he even knows who Kaito Kuroba is outside of him being Toichi Kuroba's son and maybe some childhood interactions. To him, KID is just a criminal, more honor-bound and considerably less deadly compared to the ones he usually catches, but still a criminal at the end of the day. But maybe the thought that Shinichi doesn't know Kaito Kuroba (that even if he drops the KID act, if he starts to act more like his civilian persona around him, he wouldn't know any better), gives him a false sense of security. Maybe it makes him feel more free to be careless around him.
(Deep down, however, he knows he's given out enough that if Shinichi ever does meet Kaito Kuroba, his secret identity would disintegrate almost immediately.
Sometimes he thinks that might not be so bad.)
Hakuba, meanwhile, does know who KID is under the mask. He sees his civilian self almost everyday in class. He's seen him as the prankster magician who annoys the rest of the class with his antics. He knows he's childhood friends with the daughter of the inspector in charge of putting him behind bars. Hakuba knows him as Kaito Kuroba. But he also knows him as KID. Hakuba, while he doesn't have evidence, already knows his secret identity. And that is exactly what makes him a threat. Which is why he can't let his guard down around him. The least he can give himself is plausible deniability and if he slips up in his act, either as KID or as Kaito, that plausible deniability would be gone.
(Deep down, though, he recognizes how Hakuba is still so civil with him despite it all, that, even with his determination to capture him, Hakuba still cares about him as a fellow classmate (as a friend).
And if that makes him slip up sometimes, well, who could say?)