Generally agree that rabbit holes (or as my wife calls mine: black holes) can be conducive to learning. But I suspect that there's diminishing returns. At some point, you may end up spinning your wheels and reaching out for help does not distract from learning the valuable lesson.
If you're doing a PhD, that point is a weekly chat with your supervisor. I don't see why a few hour "rabbit hole" would be a problem in software engineering. If we're even discussing hours unless billing hourly, that's a red flag for micromanagement.