Prevent arduino from drawing power from digital pins?

Hy, I have software serial on pins 2 and 3, is there a way to prevent arduino from drawing power from it while 5v supply isnt there? I can see it turning on and off and messing up serial data.
Thank you

Show us a good schematic of your proposed circuit.
Show us a good image of your ‘actual’ wiring.
Give links to components.

In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the complete sketch.
Use the </> icon from the ‘reply menu’ to attach the copied sketch.

How do you know there is no 5 volt supply?
Paul

Please post a block drawing of the setup.
Why not cut down all unit power when the Arduino power is removed?

Yes, there will be a way. And it's important that you find a way because otherwise you can damage the Arduino's MCU chip by allowing current to flow into those pins when there is no 5V supply to the chip. Connecting a voltage to any pin that is above the voltage on the Vcc pin is outside the "maximum operating parameters" for MCUs and most other types of chip. So please post that schematic and we will help you find a way.

Solved. Im using MCP2025 transciever ic to convert ibus to ttl. That chip has ENABLE pin. I had it connected directly to 5v. Now I had connected it to digital output of arduino.