You know there are a ton of commercially made leash mounts for bicycles available on Amazon and elsewhere. Most would probably work better and not cost any more than a badly cobbled together DIY mount. I love to make things myself, but it isn't always the better option.
https://www.amazon.com/s?k=bicycle+d...ref=nb_sb_noss