Here is some information to help you. https://theorganisedhousewife.com.au/cleaning-2/how-to-clean-a-bathtub/
Not sure what your problem is but I use Barkeeper's Spray Foam Cleanser on my fiberglass shower/bathtub. Works great. Best of luck.
I use Scrubbing Bubbles
If it is a fiberglass tub and it is really dirty I use Easy Off in the blue can. Or you can try this:
I use a solution of equal parts vinegar and Dawn soap. Mix it in a spray bottle. Spray and let sit for 30 minutes. Wipe clean and rinse with water.