WireGuard client: “Use this connection to send all outgoing traffic” cannot be unchecked

While configuring WireGuard as a client on my FreedomBox, I’m running into an issue with the option “Use this connection to send all outgoing traffic”. The checkbox cannot be unchecked — when I try to save the settings without it, I get the following traceback:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 105, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 144, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/django/views/generic/edit.py", line 153, in post
    return self.form_valid(form)
  File "/usr/lib/python3/dist-packages/plinth/modules/wireguard/views.py", line 222, in form_valid
    utils.edit_server(interface, form.get_settings())
  File "/usr/lib/python3/dist-packages/plinth/modules/wireguard/utils.py", line 177, in edit_server
    network.edit_connection(connection, settings)
  File "/usr/lib/python3/dist-packages/plinth/network.py", line 553, in edit_connection
    connection.commit_changes(True)
gi.repository.GLib.GError: nm-connection-error-quark: [Invalid UTF-8]: unknown setting name (5)

Steps to reproduce:

  1. Go to Apps → WireGuard.
  2. Configure a connection as a client.
  3. Try to uncheck “Use this connection to send all outgoing traffic”.
  4. Click Save.
  5. The error appears and the change is not applied.

Environment:

  • FreedomBox version: You are running Debian GNU/Linux 13 (trixie) and FreedomBox version 25.16. FreedomBox is up to date.
  • Hardware: Raspberry Pi 4B

Expected behavior:
The setting should be saved without an error when unchecked.

Actual behavior:
The error above appears, preventing the setting from being saved.