When parts are removed they sometime auto-lock to nearby parts. When they are in this auto-locked state, they cannot be deleted by dropping them on the trash icon, they can also not be deleted by placing them in the black space of the part picker. Clicking in the part picker with a part 'in-hand' should dump the part.
EDIT: I've played with this bug a little more and I think I understand something related to its cause. Whenever there is a part in the VAB behind the trash icon in the UI it does not allow the item to be trashed. However if you move the game camera so no parts are behind the UI then it lets you trash the part! (Most of the time...)
System Details
KSP Version: 0.1.0.0.20892
Operating System: Windows 11 Pro 10.0.22621 Build 2262
CPU: 12th Gen Intel(R) Core(TM) i7-12700H
GPU: NVIDIA RTX A2000 8GB Laptop GPU
GPU Driver Version 31.0.15.282
RAM: 32GB