The challenge here is that German employees are much better paid than Lebanon ones (different cost of living)
This has little to do with the cost of living. Companies don't even care if you live. As long you as do your work that is. It is about cost to the company.
I will make some assumptions here: you are working in a job that could be done by local German employees as well. Working remotely probably means some kind of tech job. While Germany has a shortage in certain professions, none of them could be done remote. Let's further assume that on average Germans and Lebanese can do the job in question at the same level. On average, there is no reason to hire one over the other as far as job relevant skills are concerned.
Now morally, it would only be fair if you got the same money for the same work you provide to the company, right? You work the same 40h week with the same skills on the same tasks as local employees.
But look at it from the company perspective. They incur costs on top of your salary. They pay overhead for the lebanese company. They pay your travel costs. They incur a communication overhead if you don't speak perfect German.
So to just be equal cost to the company, your salary needs to be lower than a local's salary by at least the amount they spend on travel costs and overhead.
And then, you are equal cost. Why would they hire you over a local guy everything else being equal? You need an advantage over the local guy, even if just a little one. Assuming equal skill level on average, that only leaves money as a leverage. To actually be hired, you need to be cheaper than locals even with the travel expenses and overhead costs.
That's why your salary is not the same by quite a margin. Companies only care for profit and they only make a profit employing you if you are cheaper overall than a local.