>Yeah I feel you. Even Japanese we use wrong grammar
>like this.▶︎ あの店に行くと美味しいご飯 "が" 食べられます。
Let me shout for my mother tongue, NOOOOOOOOOOOOOOOOOOOOOOOOO !!!!
美味しいご飯 "が" 食べられます。 is grammatically CORRECT totally.
It has the same structure as
"英語が話せます"
"納豆(NATTO)が食べられません"
"英語が分かります”
美味しいご飯 "を" 食べられます。is English-influenced-Japanese.
It is easier to understand the Japanese at first using the English S-V-O model, however, it will get you nowhere because Japanese is not one of the Indo-European language family. They are totally different languages after all.
"が" is "so-called" subject, like "私がやります”、”花がキレイです”.
> I think here the "ramen" is the direct object.
You are right in the view of Indo-European languages like English or Persian. It is like "You can eat ramen here" and the ramen is a direct object, isn't it?
However, you can find the following Japanese sentences.
あなたが好きだ(I like you)
あなたが嫌いだ(I dislike you)
あいつは殴る(I will beat him up)
ラーメンは好きだけど、寿司はキライだ(I like ramen but I don't like sushi)
Then textbooks often explain like "が(は) is basically a marker for subject but sometimes is a marker for object" It is OK, at first, to understand like this when you are a beginner.
But "が” is not a marker for object actually. It is just a marker for "so-called" subject. And "あの店に行くとおいしいラーメンが食べられます" is still correct because ~られる indicates originally "spontaneously happen" which turned to mean "can/able", "politeness" and "passive". It is rather a tough conception for beginners to understand. It takes a long explanation here. But if you want me to do it, I'll do it.
> I think here the "ramen" is the direct object.
It is not in the view of the Japanese language. "ramen" is a so-called subject. That's why the marker "が” is used here.
However, even when you say "あの店に行くとおいしいラーメンを食べられます", people would understand you. There is no room for misunderstanding. It is an acceptable one in a sense.