It’s because they don’t have same margins, but you can fix css like this:
downloadButton('downloadData',
'Download',
style = "color: #fff; background-color: #27ae60; border-color: #fff;padding: 5px 14px 5px 14px;margin: 5px 5px 5px 5px; ")
actionButton("close", "Close window" ,
icon("close"),
style = "color: #fff; background-color: red; border-color: #fff;width:130;padding: 5px 5px 5px 5px;margin: 5px 5px 5px 5px; ")
CLICK HERE to find out more related problems solutions.