Pay = hour expectations isn't reality, and we only pretend it is when we want to abuse juniors. Effort and time
are not strongly connected to pay, in office jobs. It's not even clear that they should be (but if so, and we made effective reform that direction, oh boy, it's not the
juniors who are gonna feel the most pain).
These juniors are savvy if they've realized this without having to experience work getting easier, more pleasant, and more laid-back the more money they make, directly.
[EDIT] Oh, your pay may actually be connected to this, now that I think about it. If you're leetcoding and such (guessing, based on $200k+ for juniors) you're selecting for a certain culture and set of expectations. "Play the game, get the fat paycheck". Effort not connected to playing said game is just wasted, with the way rewards are dolled out in that world. Not laziness, just rational behavior based on hiring & such being batshit crazy and favoring a rather "prep for the test, the most efficient way possible—the score is all that matters" mindset—which isn't the fault of these folks, they're looking at the system and doing exactly what it demands they do for maximum reward. If they're coming up through prestigious universities, they may well have lived their whole life like that. Check the box, get the reward, prep for checking the next box, and you'll go absolutely nuts from over-work if you don't optimize each step (if you try to do it all in the spirit of the thing, rather than the minimum required by the rules, explicit or implicit). Results focused, just not the results you want... but the ones you're accidentally asking for!
If they're smart, they're doing as much as they need to keep the job, while planning their next, career- and comp-advancing move. Try framing things in terms of the "impact" they'll get to claim if they complete steps X, Y, and Z, and see what happens, LOL. I bet they'll jump at it—that's exactly what they want to be able to talk about when they're looking for the next job in 18-24 months. May be hard to frame, say, maintenance work and minor bugfixes and such that way, though. You probably need to change how you're hiring, if you want people who'll be happy to do those things.
If you're seeing these folks leave for better (higher paid, if nothing else) roles, after a short time, and shaking your head in confusion because you thought they were bad at their jobs—I'd say the above is exactly what's happening. You're getting what you're selecting for. Worth considering, perhaps.
[EDIT EDIT] Above section most-relevant if they're also underperforming according to what you expect. If they're actually getting stuff done but just taking walks... then there's no real problem.