How do you use overlays and borders at the same time?

I’m trying to use an overlay and a border the same time, but there is no way to do that as far as I know. Is there a way to do this?

You could use a RetroArch overlay border and use this overlay to control the game: