If we change the verb, you can see the difference much cleanly in the sentences below.
他吃午饭了 He had lunch
他吃午饭去了 He went to lunch (he may had lunch already, he may still on the way to a restaurant)
我打篮球了 I played basketball
我打篮球去了 I went to play basketball (if there’s no past time such like 昨天, it also can mean “I’m going to play basketball”. Like when you are saying this with a basketball in your hands)
...去了 go somewhere to do sth
The 了 here is not a past tense, it's giving new information.
This is my understanding. I hope I’ve made it clean.