Connect a logical analyzer to tx and rx. They are not expensive. Digikey has one for $20. You can see the ones and zeroes going to the module and coming back to the pic. If you don't use a logic analyzer, it is like shooting in the dark.

About that 2-3 seconds observation, it is very likely that it is a power issue. Maybe you have a large cap that is holding a charge.


https://www.digikey.com/en/products/...DgGxgOwgF0BfIA