EDIT:- The following diagnosis is when the form widget is launched via Article Layout Builder.
line 25 - $element - Produces expected results when launched via layout.
.
.
.
Form builder produces "undefined" message when trying to submit a form using the Article Layout Builder.

I've only had a brief look, I believe the bug lies within formbuilder/ajax.php
line 25 - $element looks to return false which prevents the if statement to process from line 26.
However, even if processed, line 31 $params, is not going to fetch the correct information.

Running latest commit, on Joomla 5.
I don't believe to be a recent issue as it's was mentioned in September
#798