@Paul1826 Sorry to tell you this has gone on as long as I can remember. A guest will have a monthly rate and when they attempt to add one additional night the system will discard the monthly rate and charge the guest full rate for every single night in the stay.
Or, similar to your situation, I had a long-term guest who left early and by the time the customer service rep was done calculating I also owed the guest money - when I hadn't been paid for the current month yet either. You can try to talk to customer service and go through all of the numbers with them, you can even send them the numbers and all the calculations, but I doubt you will get very far. These are very simple algorithms that even a high school kid should be able to code with no issues, but Airbnb doesn't seem to be able to calculate the correct values automatically or manually.
Submit a CS request through Chat, don't call because they will never be able to help you, and then go through all the calculations in detail in your written messages. If you have a customer service agent who is unable to assist you, copy that chat so you don't lose all your calculations and then start over with a different customer service agent.
By the way, if the rental period starts on any day other than the 1st of the month, you can pretty much forget it - they are completely unable to process that scenario.
Good luck!