https://en.m.wikibooks.org/wiki/Polish/Prepositions_as_hints_to_declensions. Here it says "przy" means "in front of"
Yes, if you are swimming, then you are actually 'inside', so "w basenie".
"przy basenie" is just somewhere near the swimming pool, and "by" is usually the closest translation of "przy".
"at the pool" usually sounds to me like "in the place that has a swimming pool and people can come and swim in it, probably for money" rather than "my swimming pool in my backyard", so that's translated as "na basenie" - you mean a whole place then.
To my understanding, this is exactly the way it was designed. You are tested on some things that you encountered (and are expected to know) and some things you haven't encountered (and are expected to fail). After several more skills, those things that were new before are expected to be known to you. If you failed it before but passed it some time later, that means that Duolingo succeeded in teaching you that.
But I'm not the best person to talk about it because we don't take part in creating those quizzes and I haven't taken one. It's dealt with by Duolingo staff, so if you want to learn more, you should ask in the "Duolingo" forum rather than Polish course forum.