There is no specific law prohibiting lanesharing. There is a ton of info about lanesharing (which people persist in calling splitting for some reason), in this thread. I suggest you do read the whole thread.
As an asside, "splitting" suggests or implies the act of straddling, which is specifically prohibited in 21658(a) CVC. My plea is that those that want to keep it legal, please call it “lanesharring” and consistently refer to it as such. The connotation of “sharing” is much more positive and is clearly a more accurate portrayal of the legal (ie.. not outlawed, yet) act many law-abiding CA motorcyclist do safely, on a regular basis. Who wants to be the lawmaker that outlawed “sharing” in CA?
If you are against it, feel free to call it splitting.
So, to answer your question: No, you are not automatically at-fault if a collision occurs while you are lanesharing.
As a maneuver that in and of itself is not illegal, if an accident or collision occurs while a motorcyclist is lanesharing, the first thing a responding officer will need to determine is what the primary collision factor was. At that point, unless the cause is glaring and not attributed to the motorcyclist, the question comes up, "Was lanesharing the primary cause of this collision? Did the lane sharing maneuver contribute to the cause? Was the lanesharing maneuver being done safely and lawfully.
Being there are many citizens and more than a few officers that admantly believe lanesharing is totally illegal, you are already up against the 8-ball when and if they happen to weigh in on the situation. In cases like this, I believe it is best to not say anything at the scene that might be used against you. If you were proceeding safely and were fully aware of your surroundings and in control of your bike, state that clearly and ensure it is well documented. If the car driver was not proceeding safely, was not aware of their surroundings and was not in control of their vehicle, give the driver an opportunity to state that. Let them hang themselves by saying they did not see you ("I never saw him") and after they have made an admission of same, quietly point it out to the officer and any bystanders that may have witnessed the statement/admission. Point out any evidence that would tend to show the driver was not aware or was operating unsafely and ensure it is well documented. This is all simple CYA. Did the driver look? Did the driver signal their intention to turn? What did you see? What did the witnesses see? What did the driver say they did/saw/heard/ felt/believed?
More times than not, the driver will say they did not see you and moved either without looking, without signaling their intention or looked and did not see you... well, you were there or they would not have hit you! Don't argue with the cop(s), the other driver(s) or any witnesses as to the "legality" of lanesharing. If you were not splitting/straddling, ensure you state that and ensure any witnesses that saw you were not straddling lanes get their observations on the record, even if those witnesses thought the sharing was an illegal act.
Don't hang yourself and don't be an ass. If you are injured, tell them you will give a statement later. Don't make the mistake of cutting your own throat due to being in shock or traumatized by the collision and/or your injuries.
If anyone thinks the act of lanesharing was in and of itself illegal, let them go on thinking that at the scene. Let them document it as they see fit. This will be better for you than IF they think (or you stupidly convince them) they need to otherwise prove your actions were unsafe or unlawful over and above the mere fact that you were sharing lanes. If they think it is a "slamdunk" that you were at fault because you chose to share and the driver did not choose to, even if the officer cites you at the scene for splitting (when you weren't) or some other associated violation that you may or may not have been guilty of, if they do a half-assed investigation because they act on a false assumption, you or your lawyer (or insurance co.) can more easily get an under-investigated collision that is based upon a false or incorrect premise overturned vs. trying to fight a thorough investigation completed by someone that was likely unfairly biased against you and feels confident you will fight them on it later and may have grounds to overturn their findings.
I hope this makes sense to you.