Select permission denied when using linked server in a function unless inlining is off
UDF inlining is now blocked when the definition references remote tables.
This restriction was added in Microsoft SQL Server 2019 CU6.