This answer's reasoning is wrong, see comments. Becomes the target does bypass the rule about obstructions.
I'll have to look at the rules again to see if that justifies bypassing Tiny Hut or Cube of Force. Arguably not; they specifically call out spell effects being "cast through" or "pass[ing] through", which could be specific enough to beat the ability to target a creature without a clear path.
Old answer, in need of a rewrite
It's blocked because you still need a clear path to target
And would also be blocked by mundane glass, or other solid material like wood or stone. A non-straight path around an obstruction might let the spell work, or not. Speaking their name helps in cases like an invisible or hidden / totally obscured creature, or if you're blind. But not with other implicit targeting rules.
At least that's my reading; I find it hard to justify being blocked by a Cube of Force if it doesn't require a clear path to the target. (or Tiny Hut which has similar wording: spell/magical effects can't be cast through it or extend through it.) And I don't think it would be sensible to have it usable from inside a Cube of Force or Tiny Hut.
I'm not sure of the design intent of Psychic Lance, whether it was intended to bypass mundane total cover when given a name. Or the game balance implications of allowing that.
One key question is whether the spell effect for Psychic Lance has to pass through the space between the caster and the target. Since that's what Cube of Force blocks.
The default is that spells do need a clear path between caster and target, so a magical barrier like this, or a glass bubble, would block it. (See the line-of-effect tag; a term used in previous D&D editions.)
Speaking the target's name removes the sight requirement, but does not explicitly remove the clear path requirement, so it seems a valid reading to have it not bypass that requirement. And the spell description even implies there's a visible beam going from you to the target.
You unleash a shimmering lance of psychic power from your forehead at a creature that you can see within range. Alternatively, you can utter a creature's name. If the named target is within range, it becomes the spell's target even if you can't see it.
Becoming the target doesn't mean the spell effect can reach the target; it could still be blocked by something. You need a target to cast the spell at all, but you don't always know ahead of casting whether there's an invisible barrier that will block a spell. Or whether a magic barrier you can see will actually block a spell.
So sight (or a name) lets you cast the spell, but then clear path to target, or lack thereof, determines whether the spell reaches the target. For some AoE spells like Fireball, they detonate if intercepted early. For Psychic Lance, hitting a barrier would leave it with no effect.
If the spell description wanted to override the path-to-target rules, it could have said "If the named target is within range, it is affected by the spell even if you can't see it." That goes directly to "affected", bypassing the unstated requirement of needing a clear path to target because of targeting rules. Although that wording would be potentially confusing because you'd wonder if they meant that it bypassed the saving throw if you know their true name. So if they meant to bypass the clear-path requirement, saying that explicitly would be best. "If the named target is within range, it becomes the spell's target even if you can't see it, and the spell effect can pass through solid objects to reach it." Or something about bypassing total cover, except that might allow it to bypass Tiny Hut or Cube of Force as well as mundane solid objects.
But it doesn't say any of those things, so we can read the spell as not meaning that.
I don't think it's clear enough to be sure my proposed reading is the only possible one, but I think it's the most consistent with how other 5e things work.
Related Q&As:
But on the other hand, a few spells muddy the waters by being written in ways that only make sense if they go through things, without explicitly saying they do. Notably Sending, which has Range: Unlimited so the "target" is the actual creature, unlike Misty Step and Teleport which have Range: Self or 10 ft. Is there a rule that enables Sending to ignore the spell targeting rules regarding Total Cover? discusses that problem. (Could be taken as an accidental exception to the rules.)