Debugpy and by extension VSCode displays the values of variables using __repr__ when they are collapsed, but when expanded the internals of what should look like a list/dict/set are exposed:

The only way to fix this that I found is to write a pydevd extension. Unfortunately there's no standard paging mechanism (microsoft/debugpy#1179) so the variable resolvers do (list, tuple) and don't (dict, set) hand roll their own. I think copying the TupleResolver should be fine because everything is sorted and indexable.