Track
A few people have already touched on it but it will 100% depend on the track. Regardless of size, if the track is smooth and has alot of tight turns the lighter more nimble buggy will be faster. Truggy will be faster on a track that has alot of rough sections.
Also mentioned is the ease of driving. If that same drivers skill level is on the low to mid end of the spectrum for talent then truck will be faster just because it will stay on the wheels more.
I am lucky enough to live in AZ and see Billy Fischer and Ryan Mayfield drive alot and it depends on the layout, most layouts I have seen lately are more truck friendly.