The last time I went through the Panama canal was long before they they built. The new locks. I was mate on a panamax bulker and when eventually in the locks the bow was only a couple of feet from the lock gates, same down aft. Going into the locks the main engine was stopped and the mules towed you in. Once you reached the next level and the gates ahead opened the main engine was started and with mule assistance and the main engine on full ahead you crept out of the locks, the engine only going full ahead once you were far enough ahead of the stern gates that proppellor wash did not damage the gates.