SQL 2016/SQL 2017 CE Performance on Information_Schema inferior to SQL 2014 out of the box
Here is an excellent article that discusses all the aspects of the new cardinality estimator.
Bottom line - as with all changes, you win some, you lose some, and hopefully overall you win more than you lose.
With the new cardinality estimator, it is a huge win overall, in spite of the occasional hickups like you are experiencing.
You have several work arounds other than the TF, and they are discussed in the article. Easiest should be either using a query hint, not to lose the benefits of the new estimator.

USE HINT ('FORCE_LEGACY_CARDINALITY_ESTIMATION')