There could be two reasons for this. Either the paneer you used was not fresh or you overcooked it. To avoid it use good quality, fresh paneer. Homemade paneer gives the best result. Also, don't overcook the paneer cubes.