I don't know about that. Yes, if you are only learning frameworks then sure. If you are digging deeper and understanding, GPU programming, math, performance optimization, architecture, physics modeling, network programming, all of those are very transferable skills.
I think that some of the problems boil down to the language used. Game engines tend to rely heavily some Editor (be it Unity, Unreal or Godot).
I'm hoping that Rust will solve some of this by having you use a pleasant language instead of relying on GUI tools.
I legit think that it would make sense for high schools to structure their curricula around game making. You will learn math, physics, writing, art, music, programming etc etc. And you will have fun doing it.