bookmarking shiny app results in incorrect url

I'm trying to use bookmarks to be able to save the input of my app, I'm using enableBookmarking(store = "url").
I also want to record a couple of values, the tab they are in and the time when the state was saved.

There is a nice example on how to do this on ?onBookmark, but when I use the same system for my app, I get different url and it cannot be restored.
Here they are after pasting them to the browser and copying them again:

My apps : https://url?_inputs_&...&_values_=&time=%222022-08-05%2008:00:27%22
Example : https://url?_inputs_&...&_values_&time=%222022-08-05%2008%3A01%3A22%22

Notice that &_values_&time in the example becomes &_values_=&time in my app.
Also the date in the example is %222022-08-05%2008%3A01%3A22%22 while in my app %222022-08-05%2008:00:27%22 has the colons while in the example this is escaped to %3A.

The input works well, if I don't add anything on values, but if I do it cannot be parsed and I get this error:

Error in RestoreContext initialization: Failed to parse URL parameter "_values_"

This differences prevent restoring the app to the desired state. I'm using the same browser (Chromium Version 103.0.5060.134 (Official Build) snap (64-bit)) for running and accessing both shiny apps (Shiny version 1.7.1).
What I am doing wrong or how can I work around this?

In case it is needed, I am using Shiny Server Open source v1.5.17.973 on our own (Ubuntu) server.

Last, the relevant code for bookmarking:

# on server.R
server <- function(input, output, session) { 
  # Bookmark/Restore ####
  vals <- reactiveValues(savedTime = NULL)
  onBookmark(function(state) {
    time <- as.character(Sys.time())
    cat("Last saved at", time, "\n")
    vals$savedTime <- time
    # state is a mutable reference object, and we can add arbitrary values
    # to it.
    state$values$time <- time

  onRestored(function(state) {
    cat("Restoring from state bookmarked at", state$values$time, "\n")