Add M601 in Octoprint in the gcode after print paused script section. Prusa i3 MK3S+ with 3.12.2 firmware will move the printhead out of the way, set the nozzle temperature to 0 and keep the printbed at the currently set temperature.

Add M602 to the gcode before print resumed script section. Prusa i3 MK3S+ with 3.12.2 firmware will heat the nozzle back to printing temperature and move to the last position before pausing and then resume the print.