Swimming is a sport that is very neuromuscular. The strength and movement patterns are something that a novice swimmer, or a seasoned swimmer who need to improve their stroke, must practice consistently in order for those improvements to stick.
Every time you get in the pool, spend at least part of your warm up doing a few drill sets. Things like using paddles, swimming with closed fists, or practicing finishing your stroke by brushing your thigh with your thumb are all good ideas.
Also, the frequency with which you swim is important. If swimming is a weakness for you, try breaking your two long swims up into 4-5 shorter swims. Not only might you swim more total distance for the week, but you’ll be practicing (good) technique more often!