Streamlit Drawable Canvas issue

Hello, I am trying to create an annotation app for personal use that requires oriented boxes. Since the rectangle does not support orientation, I am using the polygon feature on canvas. But the polygon never gets saved. Instead, it keeps adding more points until the cursor moves out of canvas. How do I fix this?