Ok in neutral but shaking at idle in Drive isn’t an uncommon problem, and there are numerous possibilities. The engine has considerable more load in Drive vs neutral, even at idle rpm. So anything slightly wrong with the fuel/air mixture, misfires, etc will show up in spades and can cause engine shaking. One reason it could go away at higher than idle rpms in Drive is if the mixture was lean or injectors uneven at idle. As gasoline needs increase, small problems in mixture or cylinder balance symptoms will be swamped by the amount of gasoline injected. An analogy, if your garden hose-end sprayer is a little clogged up, that will show up more when adjusting it to spray very little water, like if you want to water a delicate plant. If you turn it to “full on” it will spray just fine.
One area to look then is too much air at idle due to vacuum leaks, too little gas due to clogged injectors, or injector to injector imbalance.