How can I prevent adobe media encoder from trimming the end of the video?
I can't read your screenshot, and in any case I don't use the particular tool, but I can say that some common reasons for this are: 1) the audio and video are different lengths and the particular encoding scheme or codecs don't like that; 2) the scheme or codec requires that the material ends in a full GOP (encoding quantum). 

If these are your issue, possible solutions are obvious: make the streams the same length, and/or pad the streams out to a full quantum. Probably both...