The flow of polymer melts through microscale systems is crucial in several additive manufacturing processes, such as extrusion, injection molding, and polymer three-dimensional (3D) printing. This study conducts a numerical investigation of the flow dynamics of low-density polyethylene (LDPE) polymer melts through a straight microchannel with sidewall cavities. Specifically, it examines the effects of flow rate (quantified by the Weissenberg number) and sidewall cavity aspect ratio (the ratio of cavity width to height) on the transition of the flow field from steady and laminar to unsteady and chaotic due to elastic instability. The findings indicate that flow field fluctuations in polymer melt flows, induced by elastic instability, increase progressively with the Weissenberg number. However, beyond certain Weissenberg number values, the fluctuation intensity is unexpectedly suppressed, indicating a suppression of elastic instability at high Weissenberg numbers. Additionally, as the cavity aspect ratio increases, the flow field fluctuations increase. Nevertheless, the differences in fluctuation become minimal at high Weissenberg numbers. Not only this non-monotonic transition in the flow field but also the vortex dynamics within the system depend strongly on the Weissenberg number and cavity aspect ratio. Various vortices appear in the present flow system, particularly within the cavity region, such as the central primary vortex, corner vortex, and lip vortex. The size, shape, appearance, and disappearance of these vortices are significantly influenced by the Weissenberg number and cavity aspect ratio. Moreover, the study explores the impact of adding another cavity to the microchannel sidewall on this flow transition, and it finds that the additional cavity does not affect the onset of the flow transition. However, it does introduce some differences in vortex dynamics.