You didn't understand the bug. The deselection occurs when trying to select a row at the same time as the table reloads.
Run the above code on a macOS app project and try to select rows. You will see what is going wrong
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: