So I did few tests and changes today;
1. I held the bike up and full throttled, the speed went past 50 before I couldn't hold it up anymore so it's definitely not display or controller limiting the speed to 40.
2. I peformed a hall angle test. From what I read, you don't need to do it if you're using QS hub motor with Sabvoton controller but I did it anyway, it changed hall angle from 55 to 249 and caused the motor to spin backwards which I fixed by changing motor direction setting. I topped out at 41.8mph but since it's only a 1.8mph increase, I'll throw that under margin of error.
3. I tried flux weakening, I set the current to 50A which is the max as I have a locked controller and it did increase the top speed but by only 3mph, I disabled it to make sure I wasn't going down a slight hill or something and it does increase the top speed to 44-45mph which with that increase, it's not even worth it to me to have flux weakening on. Also above 40mph when flux weakening starts, I'm hearing a high pitched beeping sound, with wind noise, it's hard to tell where it's coming from but it sounds like it's coming from the motor which I'm unsure if this is a thing or a side effect of flux weakening. It doesn't make that sound with flux weakening off. Is it even worth it to consider an unlocked controller to be able to use higher flux weakening current?