Welcome to the Forum.
In my opinion, shallow grooves are made for elongated bullets which are loaded without thick patches. Some of the them are occasionally patched with paper but generally speaking they are just lubed before loading.
These bullets rely on the enlarging that occurs when they are fired to pick up the rifling and to seal the bore against the high pressure powder gasses. They are usually very close to bore size when they are loaded and because the enlargement they produce when they are fired is not very much, shallow rifling grooves are about all they can seal.
Most modern cartridge bullets (which we don't discuss here) are the same size as the rifling grooves or slightly larger before they are fired.
The rifling I'm referring to as shallow is usually .0015"-.003" deep.
Deep rifling grooves are ideal for shooting roundballs patched with a cloth material.
The size of the ball and the fairly thick patch are larger than the rifling grooves are so when they are loaded they not only get a good grip on the grooves but they seal them against the powder gas pressure.
The soft lead roundball compresses some during loading but it is the patch that does most of the work.
This deep rifling is usually between .007" and .016" deep.
A lot of the commercially available muzzleloaders use a compromise rifling depth of .004"-.007" deep.
Guns like the Thompson Center sidelocks and some of the Lyman guns use this kind of rifling.
This is intended to work well with either patched lead roundballs or solid lead slugs, some of which are solid lead and some using a hollow base.
These can work fairly well with either type of projectile but for best results the slug should be just slightly smaller than the bore size and the patched roundball should be patched with a very tight fitting cloth patch.
The very tight patch is used to get a good grip on the medium depth rifling grooves without slipping when it is fired.