When I read the story, it seemed to me that Bathsheba deliberately tempted David, the King. She bathed directly in his view.
I suspect the adultery was willing.
She bathed where women bathed according to the custom of the time, and for that reason righteous men were expected to not be in high places where they could view them.
Your shallow attempt to mitigate David’s guilt fails on every possible level.