You did not mention the make of gun, barrel taper, or whether the barrel is free floated or not.
I had a Ruger M77 in .30-06 that tended to string vertically as the barrel warmed. The barrel was very light, and had a lot of taper so as it warmed the contact pressure changed, and it strung up like your rifle. You might check to see if there is a pressure point, and check to see when you shoot if the pressure increases (use a piece of paper between the barrel and the barrel channel). In my case, the rifle went from stringing to beautiful round groups that consistently stay under 1" at 100 yards with handloads once I free floated the barrel. It is possible for some barrels to react this way with heating as well because of varying residual stresses from machining. If the issue is ammunition temperature, it can take the rifle harmonics to a bad place as the velocities change. If it is due to barrel expansion or deflection from residual stresses, different loads should string vertically when they cause heating.
If it is a harmonic issue, then changing loads / bullet weights etc can eliminate it, and certain powders are much less susceptible to changes in temperature. If you don't reload, then you may need to try some different ammo.
Unfortunately, if the stringing is due to residual stress, it may be difficult to eliminate, except to take more time between shots.