I have read-only T-SQL that references the MSTVF. I did have some code that use both data modifications and cross apply but interleaved execution does not occur in those scenarios.
So on my SQL Server 2017 instance I set the database to 110 compatibility mode and set query store on where then I execute my code.
Note that 110 is the compatibility mode for SQL Server 2012. That becomes an important part of Arun’s story.