Shinyio app redirection after ActionButton click

My Shinyio app redirects from the url https://playoffsimulator.shinyapps.io/NHL2020PlayoffSimulator/ to https://playoffsimulator.shinyapps.io/NHL2020PlayoffSimulator/_w_adb9cd50/#section-outcomes after ActionButton click where "outcomes" is a page in my flexdashboard. The problem is the "onclick="location.href='#section-outcomes'" - removing that fixes the problem, but also means that the Outcomes page must be navigated to manually after click, which isn't always intuitive to the user. It appears the "location.href='#section-outcomes'" is creating a different href for the app while hosted, despite working locally.

The faulty action button

actionButton("go", "Run", class = "btn btn-success",
             onclick="location.href='#section-outcomes';"
             )
})

perhaps an alternate approach to navigate tabpanels

library(shiny)
 

ui <- tagList(
 
  
  navbarPage(
    title="tab example",
    id = "navbar",
    tabPanel(
      title = "tab1",
      actionButton("button", "Click me")
    ),
    tabPanel(
      title = "tab 2",
      value = "mytab2",
      
        p("stuff is here")
      
    )
  )
)

server <- function(input, output, session) {

  observeEvent(input$button,
               {
                 updateNavbarPage(session, "navbar",
                                   selected = "mytab2")
               })

}
shinyApp(ui = ui, server = server)