In Plotly for Python, we have this beautiful multiple y-axis example: here is the link for the code.
I tried to do the same with Plotly in R using this code:
Try tuning the padding (pad) value for margin argument of layout().
pad
margin
layout()
Best I found for your other parameters is with pad = 49
pad = 49