To be clear, my car did not brake suddenly. Instead, it started to move over, car behind accelerated to pass, and then my car thinking the truck was in my lane when it wasn’t, attempted to move back into the original lane causing the passing car to brake sharply. I jerked the wheel to the right and executed the lane change myself. Honestly, there was plenty of room and this was not a “fringe” maneuver as someone suggested. The phantom truck appearing in my lane was the problem. I was in control the entire time.
I understand this may have been scary but it doesn’t seem conceptually different than you driving manually, noticing a car in your blind spot and swerving back in your lane. On Houston roads, I see this commonly. If I understand your scenario correctly, the blame clearly lies with the tailgating driver who attempted to pass before you had vacated the lane. Most states have transportation laws that prohibit speeding up to overtake until the vehicle in front has completed its lane change maneuver.