Jurists differ on this point.
Imam Malik and Imam Shafi‘i require profit to follow the investment ratio. Imam Ahmad allows a different profit ratio by agreement. Imam Abu Hanifah also allows a different ratio in general, but adds an important restriction for a partner who takes no part in the work.
Capital is not only an accounting figure. It determines important legal consequences such as ownership exposure and, where applicable, the way genuine loss is allocated.