GalinMcMahon wrote: All 4 layers are the same movement (with a motorized slider).
Do all 4 layers
actually have the same camera motion, or sort-of have the same motion (and speed)? It looks from your screenshots like the speed isn't the same, which can cause perspective/size issues even if you get the masks right.
If it's exactly the same motion, you might be able to get away with a transfer mode in this case, in Edit, no Fusion required. (I.e. the background of each shelf is uniform black and the foregrounds are bright.) Use Add or Screen or Lighter or whatever looks right.
Or this might be the one situation where you could actually use a Difference Keyer. (Again, if the motion is exactly the same for each shot.)
(Both of the above only work in your situation because you have a background that's dark and nondescript and a foreground whose details are determined by their lights features. It won't work in general.)
Last, you could probably just animate the corners of the masks you've got by hand. (Use a Polygon mask and draw the four corners so you can animate them individually.) Put a keyframe at the beginning and end of the move. Then jump in the middle somewhere -- if it's necessary -- then the middle of each segment. It looks like you have enough room on each shelf so you don't have to track every variation in movement precisely. (And your motorized slider probably creates a fairly smooth motion to begin with.)
If you really need to track -- or want to learn how you'd do this if you had a well-lit bookcase with differentiable texture -- Sander de Regt's advice is spot on.
Resolve Studio 17 latest, Fusion Studio 17 latest, macOS Big Sur latest, MacBook Pro 2020 64GB RAM and Radeon Pro 5600M 8GB VRAM