Framework 16 by default doesn’t observe disable-while-typing setting found in Ubuntu (and other distributions using libinput). This is due to Framework keyboard modules being detected as an USB keyboard and thus presumed external.
This can be corrected by adjusting /usr/share/libinput/50-framework.quirks file (reboot required) to add the following definition
In MatchName if I don’t strictly match the name of the Keyboard then it will overmatch and define multiple keyboards as internal which will break the disable while typing, as what you are trying to do here is to tell your machine that the keyboard and the touchpad are both internal and part of the same system.
Find the name of your keyboards with “sudo libinput list-devices”
If you then have multiple keyboards work out which one it is (by looking at which /dev/input/eventX it is by typing in “sudo libinput debug-events” then mash your keyboard and you will get information about which keyboard the events are associated with.