I'm far from an expert in this space. And haven't used the second USART port on a PIC
But maybe PMD5 register for UART2 isn't being set correctly by picbasic??

bit 5 U2MD: Disable UART2 bit
1 = UART2 module disabled
0 = UART2 module enabled
bit 4 U1MD: Disable UART1 bit
1 = UART1 module disabled
0 = UART1 module enabled