Diode would be a good choice to keep the battery from back driving the converter.You should have a battery charge control circuit as well so the battery doesn't get overcharged.
What exactly are you trying to achieve?
The circuit applies and removes power from the RPi. If power is just removed from a RPi without shutting down the RPi OS first, their will be problems.I use a 5V switching regulator designed for the auto environment to run a RPi in my car.