Are you loading your ROM?
It’s great you are gaining mobility and flexibility, but unless you load the newly gained ROM you will not be able to maintain it. Example: if you have worked your hamstrings with some foam rolling and then some dynamic stretching, you should follow it with some type of deadlift exercise. During the deadlift, focus on your eccentric component. Research by O’Sullivan (2012) and Timmins (2016) shows improved lower extremity flexibility after eccentric exercises.
Is it a mobility problem, or is a motor control problem?
Sometimes movement is limited, but it’s not because the ROM is limited. Its limited because the muscles around the affected joint are not able to comfortably control the movement. We see this a lot with “tight” hamstrings, that improve with engaging the core muscles during active straight leg lifting. A way to self-test is to compare active stretch versus a passive stretch. There should not be a huge difference between the 2 stretches.
Is it a mobility problems, or is it weak?
Many muscles might be weak and because they are weak, they spasm in an all-out effort to generate some function. Hip flexors often present tight, but really show weak with testing and need resistive exercises; not stretching activities. The hip is another example: many “tight” hips respond to side planking. So test this on yourself if your hip feels tight.
O’Sullivan et al. (2012) The effects of eccentric training on lower limb flexibility: a systematic review. Br J Sports Med. 2012 Sep;46(12):838-45. doi: 10.1136/bjsports-2011-090835. Epub 2012 Apr 20.
Timmins et al. (2016) Architectural Changes of the Biceps Femoris Long Head after Concentric or Eccentric Training. Med Sci Sports Exerc. 2016 Mar;48(3):499-508.