I've seen something similar a long time ago. So when I was a teen I used to stay up pretty late playing video games online. Sometimes I'd take a break, go outside and just stargaze for a bit.
One night I went outside around 2am, leaned against the trunk of my dad's car and began looking around. I saw this yellow flashing light at about 12 o clock above me (no mountains near me though). I thought cool, it's a plane as it was traveling in a straight line. A moment later the flashing light stopped and was just stationary for a while. Then it started moving in the opposite direction and then in an unpredictable pattern, with a kind of jitter to it. I then thought okay it's not a plane, so maybe this glowing thing is just a lot closer than I think it is and it's just a firefly.
So I waited for some clouds to pass and the light disappeared behind it so this thing was definitely higher than the clouds (or at least appeared to be). I told my dad in the morning but he was uninterested and told me it was probably just a plane.
If anyone has any idea what this could have been it'd be much appreciated, as it still bothers me up to this day. Also, this happened in St. Lucia in the Caribbean if that helps.