I feel like this is a bug since the Pokémon Markets do not allow you to purchase an item if you already have 999 of it.
If you have 999 of one item, and later you find said item on the ground, the game will allow you to take it; exceeding the 999 item cap. I believe the game should prevent you from picking up the 1,000th item and just say "Too bad... the Bag is full.". Here is a screenshot of the Pokémon Market user interface, you can see that I have 1,000 Potions.
If you have 999 of one item, and later you find said item on the ground, the game will allow you to take it; exceeding the 999 item cap. I believe the game should prevent you from picking up the 1,000th item and just say "Too bad... the Bag is full.". Here is a screenshot of the Pokémon Market user interface, you can see that I have 1,000 Potions.