enter as a tourist while (not so) secretly being an american agent [Status as an American Agent is determined by the American government, and is therefore something "the US decided to do"]
No, it isn't, unless your claim is that Gross was a slave of the US government. He had a choice. He chose to accept several millions in exchange for the risk. And now he is paying for his choice.
If your conclusion that Cuba clearly had jurisdiction for every charge you mention was in any way valid, don't you think you could come up with a single example of a non-citizen being sent to prison for years for being a foreign agent?
How other countries choose to deal with the threats is irrelevant to what makes sense for Cuba to do, and ignoring the particular context of Cuba's actions is naive at best. Most, if not all of those you claim to have been released, have been released after negotiations have taken place, not unconditionally. Every single case that ended with an agent swap necessarily serves as the example you ask for (the agents arrested by the first country are held until the second country has something to offer in return). So far, that's also the case with Gross, only that, because the US refuses to negotiate, the negotiations have not yet taken place.
Also, Vilyam Genrikhovich Fisher, russian agent captured by the US, tried, convicted, sentenced to 30 years, served several years in prison before he was exchanged. Yu Xin Kang, Chinese, convicted by the US to 18 months. I suppose that now you are going to move the goalposts and demand some other conditions. It will be very easy to demand a condition that I cannot satisfy, after all, non-citizens don't make very good spies, and it is even rarer for a country to outright refuse to negotiate for the release of their agents. I'm curious to see what new demands you come up with.