Seems like a know issue:
RIDER-120469 Unity gets stuck on domain reload when in debug mode using Rider
Upvote it to get updates.