Automatically fill in SMS codes on iPhone

The “From Messages” shortcut above the keypad when clicked is only pasting the first digit of the verification code.
The auto-complete seems to be working in every other case I’ve tried (phone, email, word-completion) but I cannot seem to get it working for this.

Any insights?