How to prevent signal waveform from going towards negative side when increasing gain
Any of the issues below could be relevant (and probably are)


The recommended power supply operating range for the TL071 op-amp is +/- 5 volts to +/- 15 volts - you seem to be saying it runs from +/- 4.5 volts.
The output swing capabilities of the TL071 are guaranteed to be +/- 12 volts on a +/- 15 volt rail so that means, on a +/- 4.5 volt rail, the output swing might only be +/- 1.5 volts.


So there's a couple of things to think about.