@resdog76 Assuming that you need a simple rack and pinion animation for demo.
There are 2 ways to do this.
1st Way:
Technically you should use this way and its correct way of doing this motion you wanted.
1. Bring rack and pinion together in the same assembly and arrange it in an appropriate way as you need. Use the move command to mesh it properly. Arrange the meshing tooth properly.
2. Apply proper joints to rack and pinion with casing (rotary joint for the shaft of pinion & slider joint for the rack).

3. Now go to the assembly tab of the toolbar, and select "Enable Contact sets".
4. After enabling contact sets, you can select "Enable All Contact Sets", if only 2 components there in your assembly OR click on "Add New Contact Set" (This option will appear in between "Enable Contact sets" & "Enable All Contact Sets" After enabling contact sets). Then select your 2 components to add contact set.
5. That's it, Now animate your model, It will be in perfect sync of motion.
But, won't recommend this way, because using contact sets makes Fusion 360 to calculate the contact of each and every tooth, which results in the performance of software, and your animation will result in fluctuating and lagging frames.
2nd Way:
By using this way, you can create an illusion of a perfectly meshed rack and pinion.
1. Bring rack and pinion together in the same assembly and arrange it in an appropriate way as you need. Use the move command to mesh it properly. Arrange the meshing tooth properly.
2. Apply proper joints to rack and pinion with casing (rotary joint for the shaft of pinion & slider joint for the rack).
3. Now go to the assembly tab of the toolbar, and select "Motion Link".

4. Select 2 joints to link their motion. (In your case it will be the slider joint of rack and rotary joint of pinion)

5. Now calculate your gear ratio on paper. (Calculate how much distance the slider should slide after every 360° rotation of pinion). And apply this relation in the motion link dialogue box.

(In my case both were rotary joint of 2 gears, and the relation was gear 5 should rotate 4 times after every one revolution of gear 4, so my both values are in measurement of angle. In your case one value will be angle and another value will be in distance)
6. That's it, Now animate your model, It will be in perfect sync of motion.
By using this way you are creating illusion of meshing, But I don't think there is any problem unless your calculation of gear ratio is correct.
I always use the 2nd way to do gear meshing animations.