score:6
Firstly, a small correction. Citizens of Russia have visa exemption which lets them visit Thailand for up to 30 days on tourist purposes with no need of visa. This is different than a Visa on Arrival when you actually get visa stamped at the booth in the airport building.
Indeed, many countries require their citizens to provide local passports crossing the local border. E.g., if you have dual citizenship of Russia and Lebanon, you always need to cross the border of Lebanon with your Lebanese passport, while crossing the border of Russia with the Russian passport only.
This is a known practice, and the immigration officers are aware about the case, so the best sequence is as follows:
When traveling back:
One more thought. If you are an active traveler, you may be concerned of preserving free pages in your passports. Russian passport takes up to 6 months to be made and takes a lot of effort and paperwork, so obviously it is better to save free pages there.
So if time permits, consider obtaining a normal Thai tourist visa in your Lebanese passport.