lasjorg helped to resolve the bug for you at freecodecamp.org. Below you can find his decision.
That is literally how the sticky property works. The top offset is how far from the top it should stick to. You can do the same with Bootstrap by overwriting the top property value it sets (using !important). But you have to move the nav out of the header, so its scroll container is the body, then push the nav away from the top using margin.