When you use the Recents tab in the phone app and try sending an SMS, it picks a different number than the one used for the call.
Ideally, the system should continue the conversation from the same number previously used, as this can be confusing. Please see if there’s a way to keep the number consistent across calls and texts in such cases.
In the video below, you can see the From Number used for Calling was 1254484655. When I clicked on the Message Icon, rather than choosing the same number, it picked another number, which is 19039127765.
This option is now available in the Mobile App under the Settings & Preferences > Outbound Calls & SMS section