Drupal 10: Fix AJAX-related error with Views exposed forms

Enabling AJAX callbacks on Views exposed forms causes a cryptic error that "the uploaded file likely exceeded the maximum file size". In this post, I explain why this happens, and present a functioning workaround.