After also digging around, an engine modification can be made for this however its not the best scenario and its just overkill.
A custom input modifier class works for this, we can get last input and hold it however it has one major problem which is release events.. So it is not the best choice.
No need to re invent the wheel to be honest, if you need to specifically use 2D Axis the solution/hack demonstrated above would work, keeping the last input in charge. However I would have gone with WSAD digital inputs and record them as cardinals, get last inputs on cardinals and make input vector.
That would be the best concrete movement of what is desired always last input on cardinal axis considered in charge like below
results