Nomogram with regplot at shiny, code is ok, but plot only appear after resize window?

I am danny from Tainwan.
I think regplot package is great and meaningful in scoring the
score from nomogram.
It work well at R studio.
However, if I used it in Shiny with navbarPage,
a bug noted.
the renderplot plot a png, but did not show at output area(code run good).
if i resize window and it(plot) appear (not rerun).
could please tell us how to fixed it.
thanks
wish a warm day
best regard from danny

the following is testing code please

library(shiny)
library(ggplot2)
library(openxlsx)
library(magrittr)
library(survival)
library(survminer)
library(dplyr)
library(data.table)
library(arsenal)
library(shinyjs)
library(rms)
library(regplot)
ui <- navbarPage(title = "om",
tags$("debug")
tabPanel("check",
plotOutput("test")
)
)

server <- function(input, output) {

output$test<- renderPlot({
data(pbc)

pbccox <-coxph(formula = Surv(time,status==2) ~ age
               + cut(bili,breaks=c(-Inf, 2, 4, Inf))
               + sex
               + copper
               + as.factor(stage),data=pbc)

regplot(pbccox,observation=pbc[1,], clickable=FALSE,
        points=TRUE, rank="sd",failtime = c(730,1825))
})

}
shinyApp(ui = ui, server = server)
<<<<<<<<<<<<<<<<<.