Dnd Kit, the drag and drop library I was using assumed each draggable mapped to a single drop target, but my pieces spanned multiple grid cells. This was causing the pieces to occasionally drop into adjacent spaces instead of the correct space when they were placed near the edge.
The Solution
I wrote a custom algorithm to determine valid drop positions based on the top-left corner of each piece. This made the drag and drop experience feel much more precise and predictable.
First I created this rateDroppability function that assigns a number to each potential square on the board that a piece could be dropped on.
export function rateDroppability(x: number, y: number, droppableRect: any) {