In some cases the 13.0 compiler incorrectly analyzes the function return type when the function is used to declare a defined constructor or generic interface. I've attached a little example code. BTW, I know how to work around this bug.
Thank you for reporting this issue and the excellent test case. I have escalated it to the developers. The issue number is DPD200237117. I will post any updates I receive to this thread.