Position of button changes as soon as i hit the button


In the below images you can see the optimize button being shown right at the top. however when i click on the optimize button and run the code the button automatically changes its position at the bottom. how can i fix my button at the bottom permanently?. i have tried changing the position of the button but its not working . Please find attached the images for your reference. i have also attached a image of the desired output.

Thank You,
Vedant BHushan

This is the desired location of the optimized button .

Could you format this into a reproducible example? That is a set of code or rstudio.cloud project that folks can easily get up and running to replicate your issue? Currently, this is only part of a shiny app.

IF you aren't familiar with best practices for shiny reprexes, check out

This will make it easier for folks to replicate your issue and offer suggestions to solve it.

This is the state when i run the app. I want the optimize button at the bottom as shown in the first figure