If you own the copyright then yes this is 100% legal.
There are already apps that are like this. They usually add a couple features to the paid release so that people feel like they are getting something extra for the money. The good ones will eventually move those features to the open release eventually. However, this incentivizes keeping part of the app closed source so that nobody can just rename and re-release the paid version.
It is 100% up to you for how to handle these tradeoffs. Personally, I think so long as you are principled and ready for some criticism - and can handle it gracefully - getting paid for work that builds your open source app is a very good idea. We don't all have the luxury of maintaining high quality unpaid side projects!
An alternative is to have both be the same and have one just be for people who want to contribute monetarily to your efforts or have the convenience of using their preferred store (if playstore is their preferred store). I think that's sort of what Mindustry does (a foss game). It is available for 10€ on Steam, but also available for free on itch, with the steam version just having the benefit of being a steam game and having steam achievements. I guess ethically all is fine if you make clear that the game is also available for free from another place.