The documentation for PlotLegends specifies that the position of the legend can be manually controlled using Placed:
PlotLegends->Placed[leg,pos] places the legend leg at the position specified by pos. pos in a form of {{ex,ey},{lx,ly}}: scaled position {lx,ly} in the legend at scaled position {ex,ey} in expr.
However, the behaviour seems to have a discrepancy for ex or ey being below 1 or more or equal to 1. Consider the following example:
Plot[{Sin[x], Cos[x]}, {x, 0, 2 \[Pi]},
Frame -> True,
FrameLabel -> {{"y", "y"}, {"x", "Trigonometric functions"}},
ImageSize -> 400,
PlotLegends ->
Placed[LineLegend["Expressions",
LegendFunction -> (Framed[#1, FrameMargins -> 0] & )],
{{1 - 0.0001, 1 - 0.0001}, {1, 1}}]]
This results in legend being inside the Plot's frame, and almost-but-not-quite aligned with it: 
However, if one wants to actually align the legend to the corner frame, this happens:
Plot[{Sin[x], Cos[x]}, {x, 0, 2 \[Pi]},
Frame -> True,
FrameLabel -> {{"y", "y"}, {"x", "Trigonometric functions"}},
ImageSize -> 400,
PlotLegends ->
Placed[LineLegend["Expressions",
LegendFunction -> (Framed[#1, FrameMargins -> 0] & )],
{{1, 1}, {1, 1}}]]
The legend ends up aligning to the corner of the expression's frame (while also making the plot itself smaller)!

Is it possible to make this behaviour consistent? It would be amazing to be able to align to the Plot's frame rather than to the Expression's frame by default for both cases, even better to have it as an option, but even a simpler fix (everything always aligns to the Expression's frame) would be great