This is a question from Brilliant.org
The triangle $ABC$ has $AB = 9$ and $AC:BC = 40:41$. What is the maximum possible area of $ABC$?
For this question, I considered the equation $A=\frac 12ab\sin\theta$.
Since $\sin\theta\le 1$, then $A$ is maximised when $\sin\theta = 1$.
This meant $ABC$ was a right-angled triangle, after some working I got the answer as 180. However, it was wrong, Brilliant said it is not necessarily a right-angled triangle and then used Heron's formula to find the maximised area, 820.
I checked other posts which were similar to my question such as, How to maximize the area of a triangle, given two sides?. However, they followed the same method I did
I am interested in why a right-angled triangle would not maximise the area in this case and what is wrong with my logic?

Your confusion stems from the fact that the area is maximized at $\theta=90$, if you keep the side lengths $BC,AC$ fixed. However in this problem $BC,AC$ can vary in length.