I'm trying to make an app, and I'm actually serious about it. I'm using electron, so I know my source code is guaranteed to be leaked. I was thinking of making my app open source, but at the same time I don't want someone to steal it and republish it. Is there some sort of license preventing people from using my code, but at the same time keep my app open source?
A corner stone of open-source licensing is that anyone and everyone is allowed to redistribute or republish the work.
If you don't want that, then you must not use an open-source license.
To protect your project from re-publication, any license that does not allow redistribution is sufficient, or even no license at all. It does not matter if people can obtain your source code or not, it matters what they are allowed to do with it.