Answer
This happens because, once the very last step of a routing has just been approved, there's no longer a genuine 'current' step for that routing to look up — calling a get-current-step-style API at that specific moment fails for exactly that reason. Use the equivalent get-previous-step-style API method instead, which reliably returns the step that was just approved whether or not it was the final one, rather than the get-current-step method, and the same custom logic works correctly across every step, including the final approval.