It seems the difference between static and dynamic rnn was that the static implementation used a strict maximal sequence length, while the dynamic implementation used a while-loop.
If you want to limit your RNN implementation to a static sequence length, you could use a condition and return the current activation/output.