If a plane comes with a 11.1v 1000mah battery can you replace that battery with say a 11.1v 2000mah battery to increase flight time?
Well, that depends. Electrically, yes, no problem at all. BUT, there is the matter of weight. Double the capacity will almost double the weight. Not quite because you still only have one set of wires and wrapping.
So, increasing the weight will add....well, weight. It will also move your cg.
The answer depends a lot on the plane itself. If the extra ounce or two are handled easily and the battery can maybe be shifted to keep the cg where you want it, it will be okay.
You might want to just make a smaller change, like to a 1300 mAh.