User-defined function returns first character only although RETURN VARCHAR(10) is defined?
This is a bug with SQL Server inline functions in 2019 RTM.
DECLARE @Salary MONEY = 100440;
SELECT dbo.ufn_GetSalaryLevel(@Salary)

The expression in the constant scan (with CONVERT_IMPLICIT changed to CONVERT to make it runnable) is
SELECT CONVERT(VARCHAR(10), CASE
                              WHEN CASE
                                     WHEN CASE
                                            WHEN CONVERT(MONEY, @Salary, 0) &lt; ( $30000.0000 )
                                              THEN ( 1 )
                                            ELSE ( 0 )
                                          END = ( 0 )
                                          AND CASE
                                                WHEN CONVERT(MONEY, @Salary, 0) &lt;= ( $50000.0000 )
                                                  THEN ( 1 )
                                                ELSE ( 0 )
                                              END = ( 0 )
                                       THEN ( 1 )
                                     ELSE
                                       CASE
                                         WHEN CASE
                                                WHEN CONVERT(MONEY, @Salary, 0) &lt; ( $30000.0000 )
                                                  THEN ( 1 )
                                                ELSE ( 0 )
                                              END = ( 0 )
                                              AND CASE
                                                    WHEN CONVERT(MONEY, @Salary, 0) &lt;= ( $50000.0000 )
                                                      THEN ( 1 )
                                                    ELSE ( 0 )
                                                  END = ( 1 )
                                           THEN ( 1 )
                                         ELSE
                                           CASE
                                             WHEN CASE
                                                    WHEN CONVERT(MONEY, @Salary, 0) &lt; ( $30000.0000 )
                                                      THEN ( 1 )
                                                    ELSE ( 0 )
                                                  END = ( 1 )
                                               THEN ( 1 )
                                             ELSE ( 0 )
                                           END
                                       END
                                   END = ( 0 )
                                THEN ''
                              ELSE CONVERT(VARCHAR(1), CASE
                                                         WHEN CASE
                                                                WHEN CONVERT(MONEY, @Salary, 0) &lt; ( $30000.0000 )
                                                                  THEN ( 1 )
                                                                ELSE ( 0 )
                                                              END = ( 0 )
                                                              AND CASE
                                                                    WHEN CONVERT(MONEY, @Salary, 0) &lt;= ( $50000.0000 )
                                                                      THEN ( 1 )
                                                                    ELSE ( 0 )
                                                                  END = ( 0 )
                                                              AND CASE
                                                                    WHEN CASE
                                                                           WHEN CONVERT(MONEY, @Salary, 0) &lt; ( $30000.0000 )
                                                                             THEN ( 1 )
                                                                           ELSE ( 0 )
                                                                         END = ( 0 )
                                                                         AND CASE
                                                                               WHEN CONVERT(MONEY, @Salary, 0) &lt;= ( $50000.0000 )
                                                                                 THEN ( 1 )
                                                                               ELSE ( 0 )
                                                                             END = ( 1 )
                                                                      THEN ( 1 )
                                                                    ELSE
                                                                      CASE
                                                                        WHEN CASE
                                                                               WHEN CONVERT(MONEY, @Salary, 0) &lt; ( $30000.0000 )
                                                                                 THEN ( 1 )
                                                                               ELSE ( 0 )
                                                                             END = ( 1 )
                                                                          THEN ( 1 )
                                                                        ELSE ( 0 )
                                                                      END
                                                                  END = ( 0 )
                                                           THEN 'High'
                                                         ELSE CONVERT(VARCHAR(4), CASE
                                                                                    WHEN CASE
                                                                                           WHEN CONVERT(MONEY, @Salary, 0) &lt; ( $30000.0000 )
                                                                                             THEN ( 1 )
                                                                                           ELSE ( 0 )
                                                                                         END = ( 0 )
                                                                                         AND CASE
                                                                                               WHEN CONVERT(MONEY, @Salary, 0) &lt;= ( $50000.0000 )
                                                                                                 THEN ( 1 )
                                                                                               ELSE ( 0 )
                                                                                             END = ( 1 )
                                                                                         AND CASE
                                                                                               WHEN CASE
                                                                                                      WHEN CONVERT(MONEY, @Salary, 0) &lt; ( $30000.0000 )
                                                                                                        THEN ( 1 )
                                                                                                      ELSE ( 0 )
                                                                                                    END = ( 1 )
                                                                                                 THEN ( 1 )
                                                                                               ELSE ( 0 )
                                                                                             END = ( 0 )
                                                                                      THEN 'Average'
                                                                                    ELSE CONVERT(VARCHAR(7), CASE
                                                                                                               WHEN CASE
                                                                                                                      WHEN CONVERT(MONEY, @Salary, 0) &lt; ( $30000.0000 )
                                                                                                                        THEN ( 1 )
                                                                                                                      ELSE ( 0 )
                                                                                                                    END = ( 1 )
                                                                                                                 THEN 'Low'
                                                                                                               ELSE NULL
                                                                                                             END, 0)
                                                                                  END, 0)
                                                       END, 0)
                            END, 0) 

The branch with the literal High has a CONVERT(VARCHAR(1) that truncates it.
Disable inlining for that function
CREATE OR ALTER FUNCTION ufn_GetSalaryLevel(@Salary money)
RETURNS VARCHAR(10)
WITH INLINE=OFF
AS


or install the latest CU to fix this

or cast all string literals in the function to VARCHAR(10) explictly (the varchar(1) is due to the RETURN ''

or rewrite the function to be less procedural. The expression generated by the inling is pretty complex in the original code and much simpler with the below (it is able to constant fold dbo.ufn_GetSalaryLevel(100440) to 'High' at compilation time).


    CREATE OR ALTER FUNCTION ufn_GetSalaryLevel(@Salary money)
    RETURNS VARCHAR(10) AS
    BEGIN
    RETURN CASE
             WHEN @Salary &lt; 30000
               THEN 'Low'
             WHEN @Salary &lt;= 50000
               THEN 'Average'
             ELSE 'High'
           END;
    
    END;