Your title company's concern is real. Any language in the A contract that references a simultaneous resale or a third-party buyer signals to the seller that you are not a typical purchaser, and in California that can open a conversation you do not want to have. So most operators leave the A contract clean and manage that exposure a different way.
The practical approaches I have seen described:
The due diligence or inspection contingency in the A contract is the most common tool. It does not mention any third party. It just gives you a window, say five to ten days, to exit if the property does not meet your inspection standards. If the B buyer evaporates before leg A closes, you use that window. The seller sees a buyer who backed out on inspection, which is ordinary. You lose the earnest money deposit if the timeline has passed, but you do not close on a house you cannot immediately flip.
The second layer is qualifying the B buyer tightly before you even open escrow on leg A. Proof of funds, a non-refundable deposit from them, a short and hard closing deadline. A B buyer who has skin in the game is less likely to walk at the last minute.
A note on the simultaneous close variation: if your title company will do a dry close, the B buyer's funds cover leg A, which removes the transactional funding exposure entirely. The strategy guide for this method covers that structure. Worth asking your title company directly whether they will do it, because not all will.
One thing to verify with a California real estate attorney: how that inspection contingency interacts with your disclosure obligations as the brief owner. I am not in a position to advise on that, but it is the question I would bring to counsel before proceeding.
What does your current A contract timeline look like, and do you have the B buyer under a signed agreement already?