I decided to get the dinghy stern light elevated this year. I have 2 dinghies and will try two approaches. One uses 1.5" angle aluminum, the other uses PVC electrical conduit with a PVC end cap. I would use 2 stainless studs spaced a few inches apart inside the transom, with a wingnut. I only need one (upper) wingnut because that would hold the pole to the transom, and the other stud would prevent rotation to keep the pole vertical.
A few photos: