There is nothing wrong in that behavour. Although Asterisk does some negoation, there is no requirement in SIP to negotiate, and the returned set of codecs can even include ones that weren’t in the offer. (it is theoretically possible for the returned set not to include any in the offer, but it would be unlikely anyone would configure a sytem that could accept codecs but not send them.
As chan_sip is only community supported and is n ot receiving new development, I think you will need to supply the patches for this, yourself. Hoave you tried chan_pjsip?
Alternatively, simply specify the codecs individually for each peer.
Actually, I think you will find that chan_sip does honour the codecs, and will actually indicate the ulaw preference to the downstream peer and use it for selecting internal media formats.
If it is important for the phone to send using its preferred codec, it should overriding Asterisk’s preferences. It has all the information to allow that.