The risk shared in any shariah partnership attached to an asset is not in the ultimate loss in equity. This is exactly what the Shariah keeps clear from. You are viewing this partnership as a business venture/partnership. It is NOT a venture. It is a partnership in ownership. If 2 people co-own a comodity, then both are partner (equivalent to the %age ratio) of that commodity in every bit of it. However, they retain their autonomity of the share they own. The partner cannot impose his will upon the other partner. So when we say that they share the risk associated with the commodity, it means that if the the commodity is destroyed, both of the partners loose. It does NOT mean that if Partner A wishes to sell his share for a higher price, Partner B will take a percentage of that profit. Absolutely not. That independance of the ownership is fundamentally engrained in the core concept of Shar'i ownership.
Yes, the partners are bound in certain manners to protect the other from misuse of the commodity etc. However, these are detail additional terms related to any such ownership. For example, If you and I were co-owning a car, I cannot make changes to the car without your consent, since you own the commodity just like I do. Similarly, If I gift the item, it will not be complete. If I have to sell my share, i cannot sell without having presented you the opportunity to purchase the share first. But even in this, I will not be forced to reduce the sale value of my share. If I want to sell my share for $5000, and you cannot afford that, then too bad. If there is a buyer who is willing to buy it, then as long as you had your first opportunity to purchase it, Shariah requirement is filled.
This is basic understanding which ought to be kept in mind when financing. There was no mechanism of "islamic home financing" in early islamic eras, hence such asset based transactions make a mode for such financing. But the rules will remain same..
If and where the bank does violate any shar'i requirements, then indeed such contract and financing model will be compromised and shar'an non-compliant.