If you select a subset of text and then set the in and out markers in the correct places for that selection, it tries to align with different in and out marker locations than you selected. It will change the in and out markers to something else once it fails or in the rare, weird case where it can align in the wrong section of the audio anyway. It clearly tries to align the audio based on the in and out markers that it changes to rather than the ones you set. This makes it so that there is nothing you can do if aligning the full clip does not work.