I’m guessing that you are recording on a new track (below an existing track) and not appending to the end of the existing track.
If so, then it is likely that you have made a selection in the existing track(s) - the blue shading appears in the timeline when you do that - and yes, then it is quite intentional that the recording below extends for just that selected time range.
To avoid that happening, just click in the existing waveforms at a point to set the cursor position and then make you record below - it will carry on until you stop it.